view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0233",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0233",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:KENTNL",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.014"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.024"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"x_contributors" : [
"Graham Ollis <plicease@cpan.org>",
"Mohammad S Anwar (MANWAR)"
],
"x_generated_by_perl" : "v5.36.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.30",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_use_unsafe_inc" : 0
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:KENTNL",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.28.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.11",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.010"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0239",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.007"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0217"
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0233",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/build.fresh.log view on Meta::CPAN
=============================
*************************** CAUTION **************************************
* *
* INCOMPATIBLE CHANGE (JSON::XS version 2.90) *
* *
* JSON.pm had patched JSON::XS::Boolean and JSON::PP::Boolean internally *
* on loading time for making these modules inherit JSON::Boolean. *
* But since JSON::XS v3.0 it use Types::Serialiser as boolean class. *
* Then now JSON.pm breaks boolean classe overload features and *
* -support_by_pp if JSON::XS v3.0 or later is installed. *
* *
* JSON::true and JSON::false returned JSON::Boolean objects. *
* For workaround, they return JSON::PP::Boolean objects in this version. *
* *
* isa_ok(JSON::true, 'JSON::PP::Boolean'); *
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.008"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0217"
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.010"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0239",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0233",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
#pod is saved with UTF-8 encoding.
#pod
#pod For C<version> 2 (or higher), the filename should end in '.json'. L<JSON::PP>
#pod is the default JSON backend. Using another JSON backend requires L<JSON> 2.5 or
#pod later and you must set the C<$ENV{PERL_JSON_BACKEND}> to a supported alternate
#pod backend like L<JSON::XS>.
#pod
#pod For C<version> less than 2, the filename should end in '.yml'.
#pod L<CPAN::Meta::Converter> is used to generate an older metadata structure, which
#pod is serialized to YAML. CPAN::Meta::YAML is the default YAML backend. You may
#pod set the C<$ENV{PERL_YAML_BACKEND}> to a supported alternative backend, though
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
is saved with UTF-8 encoding.
For C<version> 2 (or higher), the filename should end in '.json'. L<JSON::PP>
is the default JSON backend. Using another JSON backend requires L<JSON> 2.5 or
later and you must set the C<$ENV{PERL_JSON_BACKEND}> to a supported alternate
backend like L<JSON::XS>.
For C<version> less than 2, the filename should end in '.yml'.
L<CPAN::Meta::Converter> is used to generate an older metadata structure, which
is serialized to YAML. CPAN::Meta::YAML is the default YAML backend. You may
set the C<$ENV{PERL_YAML_BACKEND}> to a supported alternative backend, though
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
'perl' => '5.006',
'File::Spec' => '0.86',
'JSON' => '2.16',
},
recommends => {
'JSON::XS' => '2.26',
},
suggests => {
'Archive::Tar' => '0',
},
},
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
sub pretty {
my ($self, $v) = @_;
my $enable = defined $v ? $v : 1;
if ($enable) { # indent_length(3) for JSON::XS compatibility
$self->indent(1)->indent_length(3)->space_before(1)->space_after(1);
}
else {
$self->indent(0)->space_before(0)->space_after(0);
}
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
encode_error("hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)")
if(!ref $obj and !$idx->[ P_ALLOW_NONREF ]);
my $str = $self->object_to_json($obj);
$str .= "\n" if ( $indent ); # JSON::XS 2.26 compatible
unless ($ascii or $latin1 or $utf8) {
utf8::upgrade($str);
}
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
}
}
}
# shamely copied and modified from JSON::XS code.
$JSON::PP::true = do { bless \(my $dummy = 1), "JSON::PP::Boolean" };
$JSON::PP::false = do { bless \(my $dummy = 0), "JSON::PP::Boolean" };
sub is_bool { defined $_[0] and UNIVERSAL::isa($_[0], "JSON::PP::Boolean"); }
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
__END__
=pod
=head1 NAME
JSON::PP - JSON::XS compatible pure-Perl module.
=head1 SYNOPSIS
use JSON::PP;
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
$perl_scalar = $json->decode( $json_text );
$pretty_printed = $json->pretty->encode( $perl_scalar ); # pretty-printing
# 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;
=head1 VERSION
2.27300
L<JSON::XS> 2.27 (~2.30) compatible.
=head1 NOTE
JSON::PP had been inculded in JSON distribution (CPAN module).
It was a perl core module in Perl 5.14.
=head1 DESCRIPTION
This module is L<JSON::XS> compatible pure Perl module.
(Perl 5.8 or later is recommended)
JSON::XS is the fastest and most proper JSON module on CPAN.
It is written by Marc Lehmann in C, so must be compiled and
installed in the used environment.
JSON::PP is a pure-Perl module and has compatibility to JSON::XS.
=head2 FEATURES
=over
=item * correct unicode handling
This module knows how to handle Unicode (depending on Perl version).
See to L<JSON::XS/A FEW NOTES ON UNICODE AND PERL> and L<UNICODE HANDLING ON PERLS>.
=item * round-trip integrity
When you serialise a perl data structure using only data types supported
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=back
=head1 FUNCTIONAL INTERFACE
Some documents are copied and modified from L<JSON::XS/FUNCTIONAL INTERFACE>.
=head2 encode_json
$json_text = encode_json $perl_scalar
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
See to L<Encode>, L<perluniintro>.
=head1 METHODS
Basically, check to L<JSON> or L<JSON::XS>.
=head2 new
$json = JSON::PP->new
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
$enabled = $json->get_ascii
If $enable is true (or missing), then the encode method will not generate characters outside
the code range 0..127. Any Unicode characters outside that range will be escaped using either
a single \uXXXX or a double \uHHHH\uLLLLL escape sequence, as per RFC4627.
(See to L<JSON::XS/OBJECT-ORIENTED INTERFACE>).
In Perl 5.005, there is no character having high value (more than 255).
See to L<UNICODE HANDLING ON PERLS>.
If $enable is false, then the encode method will not escape Unicode characters unless
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
text as latin1 (or iso-8859-1), escaping any characters outside the code range 0..255.
If $enable is false, then the encode method will not escape Unicode characters
unless required by the JSON syntax or other flags.
JSON::XS->new->latin1->encode (["\x{89}\x{abc}"]
=> ["\x{89}\\u0abc"] # (perl syntax, U+abc escaped, U+89 not)
See to L<UNICODE HANDLING ON PERLS>.
=head2 utf8
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
$json = $json->shrink([$enable])
$enabled = $json->get_shrink
In JSON::XS, this flag resizes strings generated by either
C<encode> or C<decode> to their minimum size possible.
It will also try to downgrade any strings to octet-form if possible.
In JSON::PP, it is noop about resizing strings but tries
C<utf8::downgrade> to the returned string by C<encode>.
See to L<utf8>.
See to L<JSON::XS/OBJECT-ORIENTED INTERFACE>
=head2 max_depth
$json = $json->max_depth([$maximum_nesting_depth])
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
given character in a string.
If no argument is given, the highest possible setting will be used, which
is rarely useful.
See L<JSON::XS/SSECURITY CONSIDERATIONS> for more info on why this is useful.
When a large value (100 or more) was set and it de/encodes a deep nested object/text,
it may raise a warning 'Deep recursion on subroutin' at the perl runtime phase.
=head2 max_size
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
effect on C<encode> (yet).
If no argument is given, the limit check will be deactivated (same as when
C<0> is specified).
See L<JSON::XS/SSECURITY CONSIDERATIONS> for more info on why this is useful.
=head2 encode
$json_text = $json->encode($perl_scalar)
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
JSON->new->decode_prefix ("[1] the tail")
=> ([], 3)
=head1 INCREMENTAL PARSING
Most of this section are copied and modified from L<JSON::XS/INCREMENTAL PARSING>.
In some cases, there is the need for incremental parsing of JSON texts.
This module does allow you to parse a JSON stream incrementally.
It does so by accumulating text until it has a full JSON object, which
it then can decode. This process is similar to using C<decode_prefix>
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
This is useful if you want ot repeatedly parse JSON objects and want to
ignore any trailing data, which means you have to reset the parser after
each successful decode.
See to L<JSON::XS/INCREMENTAL PARSING> for examples.
=head1 JSON::PP OWN METHODS
=head2 allow_singlequote
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
$json->allow_nonref->allow_blessed->allow_bignum;
$bigfloat = $json->decode('2.000000000000000000000000001');
print $json->encode($bigfloat);
# => 2.000000000000000000000000001
See to L<JSON::XS/MAPPING> aboout the normal conversion of JSON number.
=head2 loose
$json = $json->loose([$enable])
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
unescaped strings.
$json->loose->decode(qq|["abc
def"]|);
See L<JSON::XS/SSECURITY CONSIDERATIONS>.
=head2 escape_slash
$json = $json->escape_slash([$enable])
According to JSON Grammar, I<slash> (U+002F) is escaped. But default
JSON::PP (as same as JSON::XS) encodes strings without escaping slash.
If C<$enable> is true (or missing), then C<encode> will escape slashes.
=head2 indent_length
$json = $json->indent_length($length)
JSON::XS indent space length is 3 and cannot be changed.
JSON::PP set the indent space length with the given $length.
The default is 3. The acceptable range is 0 to 15.
=head2 sort_by
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=back
=head1 MAPPING
This section is copied from JSON::XS and modified to C<JSON::PP>.
JSON::XS and JSON::PP mapping mechanisms are almost equivalent.
See to L<JSON::XS/MAPPING>.
=head2 JSON -> PERL
=over 4
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
in hash keys (or JSON objects), they will usually be encoded in a
pseudo-random order that can change between runs of the same program but
stays generally the same within a single run of a program. C<JSON>
optionally sort the hash keys (determined by the I<canonical> flag), so
the same datastructure will serialise to the same JSON text (given same
settings and version of JSON::XS), but this incurs a runtime overhead
and is only rarely useful, e.g. when you want to compare some JSON text
against another for equality.
=item array references
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
See to L<convert_blessed>.
=item simple scalars
Simple Perl scalars (any scalar that is not a reference) are the most
difficult objects to encode: JSON::XS and JSON::PP will encode undefined scalars as
JSON C<null> values, scalars that have last been used in a string context
before encoding as JSON strings, and anything else as number value:
# dump as number
encode_json [2] # yields [2]
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=back
=head1 UNICODE HANDLING ON PERLS
If you do not know about Unicode on Perl well,
please check L<JSON::XS/A FEW NOTES ON UNICODE AND PERL>.
=head2 Perl 5.8 and later
Perl can handle Unicode and the JSON::PP de/encode methods also work properly.
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=back
=head1 SEE ALSO
Most of the document are copied and modified from JSON::XS doc.
L<JSON::XS>
RFC4627 (L<http://www.ietf.org/rfc/rfc4627.txt>)
=head1 AUTHOR
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
1;
=head1 AUTHOR
This idea is from L<JSON::XS::Boolean> written by Marc Lehmann <schmorp[at]schmorp.de>
=cut
JSON_PP_BOOLEAN
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.028"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.009"
}
},
"x_authority" : "cpan:KENTNL",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
}
view all matches for this distribution
view release on metacpan or search on metacpan
sub pretty {
my ($self, $v) = @_;
my $enable = defined $v ? $v : 1;
if ($enable) { # indent_length(3) for JSON::XS compatibility
$self->indent(1)->indent_length(3)->space_before(1)->space_after(1);
}
else {
$self->indent(0)->space_before(0)->space_after(0);
}
encode_error("hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)")
if(!ref $obj and !$idx->[ P_ALLOW_NONREF ]);
my $str = $self->object_to_json($obj);
$str .= "\n" if ( $indent ); # JSON::XS 2.26 compatible
unless ($ascii or $latin1 or $utf8) {
utf8::upgrade($str);
}
}
}
}
# shamely copied and modified from JSON::XS code.
$JSON::PP::true = do { bless \(my $dummy = 1), "JSON::PP::Boolean" };
$JSON::PP::false = do { bless \(my $dummy = 0), "JSON::PP::Boolean" };
sub is_bool { defined $_[0] and UNIVERSAL::isa($_[0], "JSON::PP::Boolean"); }
view all matches for this distribution
view release on metacpan or search on metacpan
script/cpanurl view on Meta::CPAN
sub pretty {
my ($self, $v) = @_;
my $enable = defined $v ? $v : 1;
if ($enable) { # indent_length(3) for JSON::XS compatibility
$self->indent(1)->indent_length(3)->space_before(1)->space_after(1);
}
else {
$self->indent(0)->space_before(0)->space_after(0);
}
script/cpanurl view on Meta::CPAN
encode_error("hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)")
if(!ref $obj and !$idx->[ P_ALLOW_NONREF ]);
my $str = $self->object_to_json($obj);
$str .= "\n" if ( $indent ); # JSON::XS 2.26 compatible
unless ($ascii or $latin1 or $utf8) {
utf8::upgrade($str);
}
script/cpanurl view on Meta::CPAN
}
}
}
# shamely copied and modified from JSON::XS code.
$App::cpanurl::JSON::PP::true = do { bless \(my $dummy = 1), "App::cpanurl::JSON::PP::Boolean" };
$App::cpanurl::JSON::PP::false = do { bless \(my $dummy = 0), "App::cpanurl::JSON::PP::Boolean" };
sub is_bool { defined $_[0] and UNIVERSAL::isa($_[0], "App::cpanurl::JSON::PP::Boolean"); }
view all matches for this distribution
view release on metacpan or search on metacpan
"Thibault Duponchelle <thibault.duponchelle@gmail.com>",
"Will Sheppard <will.sheppard.uk@gmail.com>",
"yoshikazusawa <883514+yoshikazusawa@users.noreply.github.com>"
],
"x_generated_by_perl" : "v5.40.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.39",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://github.com/uperl/App-datasection"
}
},
"version" : "0.01",
"x_generated_by_perl" : "v5.40.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.38",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_use_unsafe_inc" : 0
}
view all matches for this distribution
view release on metacpan or search on metacpan
"x_contributors" : [
"Jeffrey Kegler <JKEGL@cpan.org>",
"Steven Haryanto <stevenharyanto@gmail.com>"
],
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution