NAME

Data::Section::Pluggable::Plugin::Json - Data::Section::Pluggable Plugin for JSON

VERSION

version 0.08

SYNOPSIS

use Data::Section::Pluggable;

my $dsp = Data::Section::Pluggable->new
                                  ->add_plugin('json');

# prints "Welcome to Perl"
say $dsp->get_data_section('hello.json')->{message};

__DATA__
@@ hello.json
{"message":"Welcome to Perl"}

DESCRIPTION

This plugin decodes json from __DATA__. It only applies to filenames with the .json extension. Under the covers it uses JSON::MaybeXS so it is recommended that you also install Cpanel::JSON::XS for better performance.

SEE ALSO

Data::Section::Pluggable

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.