Permalink
Browse files

Merge pull request #216 from karenetheridge/ether/json_maybexs

switch from JSON to JSON::PP
  • Loading branch information...
2 parents f13faa8 + c660141 commit a2b3038ae9ceaa5468e7e785ff163bbd20422bf4 @miyagawa miyagawa committed Nov 11, 2016
Showing with 10 additions and 9 deletions.
  1. +1 −0 Changes
  2. +1 −1 META.json
  3. +2 −2 Makefile.PL
  4. +1 −1 cpanfile
  5. +4 −4 lib/Carton/Util.pm
  6. +1 −1 xt/cli/json_pp.t
View
@@ -1,6 +1,7 @@
Revision history for carton
{{$NEXT}}
+ - switched from JSON to JSON::PP
v1.0.28 2016-05-23 22:30:48 PDT
- Emit the line when parser error happened
View
@@ -50,7 +50,7 @@
"CPAN::Meta::Requirements" : "2.121",
"Class::Tiny" : "1.001",
"Getopt::Long" : "2.39",
- "JSON" : "2.53",
+ "JSON::PP" : "2.27300",
"Module::CPANfile" : "0.9031",
"Module::CoreList" : "0",
"Module::Metadata" : "1.000003",
View
@@ -26,7 +26,7 @@ my %WriteMakefileArgs = (
"CPAN::Meta::Requirements" => "2.121",
"Class::Tiny" => "1.001",
"Getopt::Long" => "2.39",
- "JSON" => "2.53",
+ "JSON::PP" => "2.27300",
"Module::CPANfile" => "0.9031",
"Module::CoreList" => 0,
"Module::Metadata" => "1.000003",
@@ -48,7 +48,7 @@ my %FallbackPrereqs = (
"CPAN::Meta::Requirements" => "2.121",
"Class::Tiny" => "1.001",
"Getopt::Long" => "2.39",
- "JSON" => "2.53",
+ "JSON::PP" => "2.27300",
"Module::CPANfile" => "0.9031",
"Module::CoreList" => 0,
"Module::Metadata" => "1.000003",
View
@@ -4,7 +4,7 @@ on configure => sub {
requires 'perl', '5.8.5';
-requires 'JSON', 2.53;
+requires 'JSON::PP', '2.27300';
requires 'Module::Metadata', 1.000003;
requires 'Module::CPANfile', 0.9031;
View
@@ -18,14 +18,14 @@ sub dump_json {
}
sub from_json {
- require JSON;
- JSON::decode_json($_[0]);
+ require JSON::PP;
+ JSON::PP->new->utf8->decode($_[0])
}
sub to_json {
my($data) = @_;
- require JSON;
- JSON->new->utf8->pretty->canonical->encode($data);
+ require JSON::PP;
+ JSON::PP->new->utf8->pretty->canonical->encode($data);
}
1;
View
@@ -8,7 +8,7 @@ plan skip_all => "perl <= 5.14" if $] >= 5.015;
my $app = cli();
$app->write_cpanfile(<<EOF);
-requires 'JSON';
+requires 'JSON::PP';
requires 'CPAN::Meta', '2.12';
EOF

0 comments on commit a2b3038

Please sign in to comment.