Data::Section::Pluggable::Plugin::Json - Data::Section::Pluggable Plugin for JSON
version 0.08
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"}
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.
Graham Ollis <plicease@cpan.org>
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.