Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
perlancar committed Jan 5, 2016
2 parents 1fc2ab1 + 33bc46f commit 8c8d3a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pp-json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ GetOptions(

my $json;
if ($json_mod eq 'PP') {
require JSON::PP; $json = JSON::PP->new->canonical->allow_nonref;
require JSON::PP; $json = JSON::PP->new;
} elsif ($json_mod eq 'XS') {
require JSON::XS; $json = JSON::XS->new->canonical->allow_nonref;
require JSON::XS; $json = JSON::XS->new;
} else {
require JSON; $json = JSON ->new->canonical->allow_nonref;
require JSON; $json = JSON ->new;
}

$json->pretty(1);
$json->canonical->allow_nonref->pretty(1);

undef $/;
print $json->encode($json->decode(scalar <>));
Expand Down

0 comments on commit 8c8d3a3

Please sign in to comment.