NAME
Nobody::JSON - JSON encoding with the prettiest possible output
SYNOPSIS
use Nobody::JSON;
my $text = json->encode({ key => "value", list => [1, 2, 3] });
my $data = json->decode($text);
my $line = jsonl->encode($data);
DESCRIPTION
Nobody::JSON supplies two cached JSON codecs backed by JSON::XS: json for readable output and jsonl for compact UTF-8 output.
EXPORTS
Only json and jsonl are exported. Both are available by default, through explicit imports, and through :all.
FUNCTIONS
json()
Returns the cached readable codec. Use its encode and decode methods. Output is ASCII-safe, pretty-printed, and uses canonical key ordering. The codec also supports load and save with path objects.
jsonl()
Returns the cached compact UTF-8 JSON::XS codec with canonical key ordering. Use its encode and decode methods. Add a newline when writing an encoded value as a JSON Lines record.
AUTHOR
Rich Paul, <nobody at cpan.org>
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.