summaryrefslogtreecommitdiff
path: root/cpan/JSON-PP
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2017-12-26 13:49:11 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2017-12-26 14:14:43 +0000
commit9bccc4c23b2fde535b76945c5fcb320fc2361cf2 (patch)
tree63db03d1a4e30752248b09db818484bb77f3c436 /cpan/JSON-PP
parent1abe70d82a813f037be793cff289f7444508418b (diff)
downloadperl-9bccc4c23b2fde535b76945c5fcb320fc2361cf2.tar.gz
Update JSON-PP to CPAN version 2.97001
[DELTA] 2.97001 to be released - tweak internal number detector to always considers a flagged value as a string (GH#35, haarg++) - clarify json_pp options (RT-123766; Dan Jacobson)
Diffstat (limited to 'cpan/JSON-PP')
-rw-r--r--cpan/JSON-PP/bin/json_pp10
-rw-r--r--cpan/JSON-PP/lib/JSON/PP.pm6
-rw-r--r--cpan/JSON-PP/lib/JSON/PP/Boolean.pm2
3 files changed, 13 insertions, 5 deletions
diff --git a/cpan/JSON-PP/bin/json_pp b/cpan/JSON-PP/bin/json_pp
index a0d245c104..e1d1c5fff8 100644
--- a/cpan/JSON-PP/bin/json_pp
+++ b/cpan/JSON-PP/bin/json_pp
@@ -20,7 +20,7 @@ GetOptions(
't=s' => \( my $opt_to = 'json' ),
'json_opt=s' => \( my $json_opt = 'pretty' ),
'V' => \( my $version ),
-) or die "Usage: $0 [-V] [-f from_format] [-t to_format] [-json_opt options]\n";
+) or die "Usage: $0 [-V] [-f from_format] [-t to_format] [-json_opt options_to_json1[,options_to_json2[,...]]]\n";
if ( $version ) {
@@ -94,7 +94,7 @@ json_pp - JSON::PP command utility
=head1 SYNOPSIS
- json_pp [-v] [-f from_format] [-t to_format] [-json_opt options_to_json]
+ json_pp [-v] [-f from_format] [-t to_format] [-json_opt options_to_json1[,options_to_json2[,...]]]
=head1 DESCRIPTION
@@ -154,6 +154,12 @@ Acceptable options are:
ascii latin1 utf8 pretty indent space_before space_after relaxed canonical allow_nonref
allow_singlequote allow_barekey allow_bignum loose escape_slash
+Multiple options must be separated by commas:
+
+ Right: -json_opt pretty,canonical
+
+ Wrong: -json_opt pretty -json_opt canonical
+
=head2 -v
Verbose option, but currently no action in fact.
diff --git a/cpan/JSON-PP/lib/JSON/PP.pm b/cpan/JSON-PP/lib/JSON/PP.pm
index f608c299b9..714c848d9b 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 = '2.97000';
+$JSON::PP::VERSION = '2.97001';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -416,6 +416,8 @@ sub allow_bigint {
return;
} else {
no warnings 'numeric';
+ # if the utf8 flag is on, it almost certainly started as a string
+ return if utf8::is_utf8($value);
# detect numbers
# string & "" -> ""
# number & "" -> 0 (with warning)
@@ -1654,7 +1656,7 @@ JSON::PP - JSON::XS compatible pure-Perl module.
=head1 VERSION
- 2.97000
+ 2.97001
=head1 DESCRIPTION
diff --git a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
index bb577bfcce..1d1c5c485c 100644
--- a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
+++ b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
@@ -8,7 +8,7 @@ use overload (
fallback => 1,
);
-$JSON::PP::Boolean::VERSION = '2.97000';
+$JSON::PP::Boolean::VERSION = '2.97001';
1;