},
'JSON::PP' => {
- 'DISTRIBUTION' => 'ISHIGAKI/JSON-PP-4.04.tar.gz',
+ 'DISTRIBUTION' => 'ISHIGAKI/JSON-PP-4.05.tar.gz',
'FILES' => q[cpan/JSON-PP],
},
use Carp ();
#use Devel::Peek;
-$JSON::PP::VERSION = '4.04';
+$JSON::PP::VERSION = '4.05';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
=head1 VERSION
- 4.04
+ 4.05
=head1 DESCRIPTION
fallback => 1,
);
-$JSON::PP::Boolean::VERSION = '4.04';
+$JSON::PP::Boolean::VERSION = '4.05';
1;
# copied over from JSON::XS and modified to use JSON::PP
+use strict;
+use warnings;
+
+my $loaded;
BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 9 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 35 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 76 + 2 };
# Authors: don
use strict;
+use warnings;
use Test;
# main
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 9 };
use JSON::PP;
my ($js,$obj,$json);
-my $pc = new JSON::PP;
+my $pc = JSON::PP->new;
$obj = {foo => "bar"};
$js = $pc->encode($obj);
use Test::More;
use strict;
+use warnings;
use utf8;
BEGIN { plan tests => 17 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
#########################
my ($js,$obj,$str);
-my $pc = new JSON::PP;
+my $pc = JSON::PP->new;
$obj = {test => qq|abc"def|};
$str = $pc->encode($obj);
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
BEGIN { plan tests => 20 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
my ($js,$obj);
-my $pc = new JSON::PP;
+my $pc = JSON::PP->new;
$js = q|{}|;
use Test::More;
use strict;
+use warnings;
BEGIN { plan tests => 6 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
#########################
my ($js,$obj);
-my $pc = new JSON::PP;
+my $pc = JSON::PP->new;
$js = '{"foo":0}';
$obj = $pc->decode($js);
use Test::More;
use strict;
+use warnings;
BEGIN { plan tests => 1 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use Test::More;
use strict;
+use warnings;
BEGIN { plan tests => 8 + 2 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
#########################
my ($js,$obj);
-my $pc = new JSON::PP;
+my $pc = JSON::PP->new;
$js = q|[-12.34]|;
$obj = $pc->decode($js);
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 16 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 11 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 4 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 4 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 2 };
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 8 };
{
my $text = '[5],{"":1} , [ 1,2, 3], {"3":null}';
- my $coder = new JSON::PP;
+ my $coder = JSON::PP->new;
for (0 .. length $text) {
my $a = substr $text, 0, $_;
my $b = substr $text, $_;
{
my $text = '[x][5]';
- my $coder = new JSON::PP;
+ my $coder = JSON::PP->new;
$coder->incr_parse ($text);
ok (!eval { $coder->incr_parse }, "sparse1");
ok (!eval { $coder->incr_parse }, "sparse2");
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 10 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
-
-use strict;
use JSON::PP;
my $json = JSON::PP->new;
my $data = ["\x{53f0}\x{6240}\x{306e}\x{6d41}\x{3057}",
"\x{6c60}\x{306e}\x{30ab}\x{30a8}\x{30eb}"];
my $js = JSON::PP->new->encode ($data);
-my $j = new JSON::PP;
+my $j = JSON::PP->new;
my $object = $j->incr_parse ($js);
die "no object" if !$object;
# copied over from JSON::XS and modified to use JSON::PP
+package JSON::PP::freeze;
+
+1;
+
+package JSON::PP::tojson;
+
+1;
+
+package main;
+
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 20 };
BEGIN { $^W = 0 } # hate
777
}
-my $obj = bless { k => 1 }, JSON::PP::freeze::;
-my $enc = $json->encode ($obj);
+$obj = bless { k => 1 }, JSON::PP::freeze::;
+$enc = $json->encode ($obj);
ok ($enc eq '("JSON::PP::freeze")[3,1,2]');
my $dec = $json->decode ($enc);
# copied over from JSON::XS and modified to use JSON::PP
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 24576 };
use Test::More;
use strict;
+use warnings;
BEGIN { plan tests => 3 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use JSON::PP;
\r
use Test::More;\r
-use strict;\r
+use strict;
+use warnings;\r
BEGIN { plan tests => 2 };\r
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }\r
use JSON::PP;\r
\r
use Test::More;\r
-use strict;\r
+use strict;
+use warnings;\r
BEGIN { plan tests => 2 };\r
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }\r
use JSON::PP;\r
\r
use Test::More;\r
-use strict;\r
+use strict;
+use warnings;\r
BEGIN { plan tests => 4 };\r
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }\r
use JSON::PP;\r
# decode on Perl 5.005, 5.6, 5.8 or later
#
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 6 };
# decode on Perl 5.005, 5.6, 5.8 or later
#
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 7 };
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 9 };
: '';
-my $json = new JSON::PP;
+my $json = JSON::PP->new;
$json->allow_nonref->allow_bignum(1);
$json->convert_blessed->allow_blessed;
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 3 };
use strict;
+use warnings;
use Test::More tests => 4;
BEGIN {
package Foo;
use strict;
+use warnings;
use overload (
'eq' => sub { 0 },
'""' => sub { $_[0] },
package Bar;
use strict;
+use warnings;
use overload (
'eq' => sub { 0 },
'""' => sub { $_[0] },
use strict;
+use warnings;
use Test::More tests => 8;
BEGIN {
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 2 };
use strict;
+use warnings;
use Test::More tests => 4;
use JSON::PP;
use Test::More;
use strict;
+use warnings;
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
BEGIN { $ENV{PERL_JSON_PP_USE_B} = 0 }
use JSON::PP;
use strict;
+use warnings;
use Test::More;
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use JSON::PP;
# by Nicolas Seriot (https://github.com/nst/JSONTestSuite)
use strict;
+use warnings;
use Test::More;
BEGIN { plan skip_all => 'this test is for Perl 5.8 or later' if $] < 5.008; }
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 1 };
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 4 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use strict;
+use warnings;
use Test::More;
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use JSON::PP;
use strict;
+use warnings;
use Test::More;
BEGIN { plan tests => 1 };