NAME

JSON::Meth - no-nonsense JSON encoding/decoding as method calls on data

SYNOPSIS

use JSON::Meth;

# encode JSON:
my $json_string = { my => 'data', foo => [ 'bar' ] }->$j;

# decode JSON
my $perl_structure = '["look","ma!","no","vars"]'->$j;

DESCRIPTION

Don't make me think and give me what I want! This module automatically figures out whether you want to encode a Perl data structure to JSON or decode a JSON string to a Perl data structure.

EXPORTS

$j variable

The module exports a single variable $j. To encode/decode JSON, simply make a method call on your data, with $j as the name of the method (see SYNOPSIS).

PREFIX/POSTFIX

If you're not a fan of postfix decoding, just use $j as a prefix call:

# encode JSON:
my $json_string = $j->( { my => 'data', foo => [ 'bar' ] } );

# decode JSON
my $perl_structure = $j->( '["look","ma!","no","vars"]' );

REPOSITORY

Fork this module on GitHub: https://github.com/zoffixznet/JSON-Meth

BUGS

To report bugs or request features, please use https://github.com/zoffixznet/JSON-Meth/issues

If you can't access GitHub, you can email your request to bug-json-meth at rt.cpan.org

AUTHOR

ZOFFIX ZOFFIX

LICENSE

You can use and distribute this module under the same terms as Perl itself. See the LICENSE file included in this distribution for complete details.