4 BEGIN { plan tests => 2 };
\r
5 BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
\r
7 #########################
\r
9 my $json = JSON::PP->new->allow_nonref;
\r
11 eval q| $json->decode('{foo:"bar"}') |;
\r
13 ok($@); # in XS and PP, the error message differs.
\r
15 $json->allow_barekey;
\r
17 is($json->decode('{foo:"bar"}')->{foo}, 'bar');
\r