diff --git a/.git-rr-cache b/.git-rr-cache index d4f6cd333d4..388f485c38f 160000 --- a/.git-rr-cache +++ b/.git-rr-cache @@ -1 +1 @@ -Subproject commit d4f6cd333d45bcf2cb94c75fd7a6e6ec6690a0ee +Subproject commit 388f485c38ffdb0c1caea2742246939bf9838e0b diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 67642263d50..c47a211f6c8 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -914,10 +914,10 @@ package Maintainers; }, 'JSON::PP' => { - 'DISTRIBUTION' => 'MAKAMAKA/JSON-PP-4.02.tar.gz', + 'DISTRIBUTION' => 'MAKAMAKA/JSON-PP-4.03.tar.gz', 'FILES' => q[cpan/JSON-PP], - # fallback to Cpanel::JSON::XS, fixed Boolean - #'CUSTOMIZED' => [ qw( lib/JSON/PP.pm lib/JSON/PP/Boolean.pm )], + # doc only + #'CUSTOMIZED' => [ qw( lib/JSON/PP.pm )], }, 'lib' => { diff --git a/cpan/JSON-PP/bin/json_pp b/cpan/JSON-PP/bin/json_pp index 5f956b1fc31..8a37ac1fa6d 100644 --- a/cpan/JSON-PP/bin/json_pp +++ b/cpan/JSON-PP/bin/json_pp @@ -3,6 +3,7 @@ BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use Getopt::Long; +use Encode (); use JSON::PP (); @@ -42,10 +43,17 @@ for my $opt (split /,/, $json_opt) { my %F = ( 'json' => sub { my $json = JSON::PP->new; + my $enc = + /^\x00\x00\x00/s ? "utf-32be" + : /^\x00.\x00/s ? "utf-16be" + : /^.\x00\x00\x00/s ? "utf-32le" + : /^.\x00.\x00/s ? "utf-16le" + : "utf-8"; for my $key (keys %json_opt) { + next if $key eq 'utf8'; $json->$key($json_opt{$key}); } - $json->decode( $_ ); + $json->decode( Encode::decode($enc, $_) ); }, 'eval' => sub { my $v = eval "no strict;\n#line 1 \"input\"\n$_"; @@ -84,8 +92,11 @@ $F{$opt_from} $T{$opt_to} or die "$opt_from: not a valid toformat\n"; -local $/; -$_ = ; +{ + local $/; + binmode STDIN; + $_ = ; +} $_ = $F{$opt_from}->(); $_ = $T{$opt_to}->(); diff --git a/cpan/JSON-PP/lib/JSON/PP.pm b/cpan/JSON-PP/lib/JSON/PP.pm index 10a3d7cc76b..adffced82de 100644 --- a/cpan/JSON-PP/lib/JSON/PP.pm +++ b/cpan/JSON-PP/lib/JSON/PP.pm @@ -14,7 +14,7 @@ use JSON::PP::Boolean; use Carp (); #use Devel::Peek; -$JSON::PP::VERSION = '4.02_01'; +$JSON::PP::VERSION = '4.03_01'; @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json); @@ -1773,14 +1773,14 @@ JSON::PP - JSON::XS compatible pure-Perl module. =head1 VERSION - 4.02 + 4.03_01 =head1 DESCRIPTION JSON::PP is a pure perl JSON decoder/encoder, and (almost) compatible -to much faster L written by Marc Lehmann in C. JSON::PP -works as a fallback module when you use L module without having -installed JSON::XS. +to L, L and L. JSON::PP works as a +fallback module when you use L module without having installed +JSON::XS or Cpanel::JSON::XS. Because of this fallback feature of JSON.pm, JSON::PP tries not to be more JavaScript-friendly than JSON::XS (i.e. not to escape extra diff --git a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm index 8925f0cb9d6..1ea67828b1f 100644 --- a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm +++ b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm @@ -10,7 +10,7 @@ overload::import('overload', fallback => 1, ); -$JSON::PP::Boolean::VERSION = '4.02_01'; +$JSON::PP::Boolean::VERSION = '4.03'; 1; diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 4270db0839a..ff9ff5986ef 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -18971,7 +18971,7 @@ our %delta :const = ( 'IO::Uncompress::Inflate'=> '2.086', 'IO::Uncompress::RawInflate'=> '2.086', 'IO::Uncompress::Unzip' => '2.086', - 'JSON::PP' => '4.02_01', + 'JSON::PP' => '4.03_01', 'Math::BigFloat' => '1.999816', 'Math::BigInt' => '1.999816', 'Math::BigInt::Calc' => '1.999816', diff --git a/pod/perlcdelta.pod b/pod/perlcdelta.pod index 1fdd4644bdd..fe795a5b4c5 100644 --- a/pod/perlcdelta.pod +++ b/pod/perlcdelta.pod @@ -834,7 +834,7 @@ L<[cpan #105700]|https://rt.cpan.org/Ticket/Display.html?id=1105700> probe for more external gzips, make t/external.t strict safe. -=item L 4.02_01 +=item L 4.03_01 Upstream + Keep some of our cperl-specific docs