Skip to content

Commit

Permalink
Merge pull request #290 from leejo/gh/288_json_to_json_maybexs
Browse files Browse the repository at this point in the history
resolve #288 - replace JSON with JSON::MaybeXS
  • Loading branch information
schwern committed May 31, 2016
2 parents 9101026 + 4b474bf commit 60b6b81
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Expand Up @@ -45,7 +45,7 @@ my $builder = MyBuild->new(
'Hash::Merge::Simple' => '0.04',
'List::MoreUtils' => '0.22',
indirect => '0.24',
'JSON' => '2.17',
'JSON::MaybeXS' => '1.003005',
'YAML::Any' => '0.70',
'Digest::SHA' => '5.45',
'Digest::MD5' => '2.36',
Expand Down
2 changes: 1 addition & 1 deletion META.json
Expand Up @@ -62,7 +62,7 @@
"Hash::StoredIterator" : "0.007",
"IPC::System::Simple" : "1.18",
"Import::Into" : "1.002003",
"JSON" : "2.17",
"JSON::MaybeXS" : "1.003005",
"List::MoreUtils" : "0.22",
"Modern::Perl" : "1.03",
"Module::Load" : "0.16",
Expand Down
2 changes: 1 addition & 1 deletion META.yml
Expand Up @@ -158,7 +158,7 @@ requires:
Hash::StoredIterator: '0.007'
IPC::System::Simple: '1.18'
Import::Into: '1.002003'
JSON: '2.17'
JSON::Maybe::XS: '1.003005'
List::MoreUtils: '0.22'
Modern::Perl: '1.03'
Module::Load: '0.16'
Expand Down
4 changes: 2 additions & 2 deletions lib/perl5i/2/Meta/Instance.pm
Expand Up @@ -177,8 +177,8 @@ sub dump {
}

sub as_json {
require JSON;
my $json = JSON->new
require JSON::MaybeXS;
my $json = JSON::MaybeXS->new
->utf8
->pretty
->allow_unknown
Expand Down
4 changes: 2 additions & 2 deletions t/dump/hash.t
Expand Up @@ -17,8 +17,8 @@ is_deeply eval %h->mo->perl, \%h;
is_deeply eval $ref->mo->perl, $ref;

{
use JSON;
is_deeply from_json( %h->mo->dump( format => "json" ) ), \%h;
use JSON::MaybeXS;
is_deeply decode_json( %h->mo->dump( format => "json" ) ), \%h;
}

{
Expand Down
4 changes: 2 additions & 2 deletions t/dump/obj.t
Expand Up @@ -21,8 +21,8 @@ is_deeply eval $obj->mo->dump, $hash;
is_deeply eval $obj->mo->dump( format => "perl" ), $hash;

{
use JSON;
is_deeply from_json( $obj->mo->dump( format => "json" ) ), $hash;
use JSON::MaybeXS;
is_deeply decode_json( $obj->mo->dump( format => "json" ) ), $hash;
}

{
Expand Down

0 comments on commit 60b6b81

Please sign in to comment.