new#

A new encoder/decoder with the defaults: allow_nonref on, a maximum depth of 512, an indent of 3, everything else off.

Synopsis#

my $json = JSON::PP->new->utf8->canonical->escape_slash;

What you get back#

A hash blessed into the class it was called on, as JSON::PP’s objects always are: a subclass may keep its own keys in it. The option methods return it again, so that they chain.