Json-Pp

JSON::PP(3p) Perl Programmers Reference Guide JSON::PP(3p)

Json-Pp

JSON::PP(3p) Perl Programmers Reference Guide JSON::PP(3p) # JSON::PP(3p) Perl Programmers Reference Guide JSON::PP(3p) NNAAMMEE # JSON::PP - JSON::XS compatible pure-Perl module. SSYYNNOOPPSSIISS # use JSON::PP; # exported functions, they croak on error # and expect/generate UTF-8 $utf8_encoded_json_text = encode_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = decode_json $utf8_encoded_json_text; # OO-interface $json = JSON::PP->new->ascii->pretty->allow_nonref; $pretty_printed_json_text = $json->encode( $perl_scalar ); $perl_scalar = $json->decode( $json_text ); # Note that JSON version 2.0 and above will automatically use # JSON::XS or JSON::PP, so you should be able to just: use JSON; DDEESSCCRRIIPPTTIIOONN # JSON::PP is a pure perl JSON decoder/encoder, and (almost) compatible to much faster JSON::XS written by Marc Lehmann in C. ...