1 2use Test::More; 3use strict; 4BEGIN { plan tests => 2 }; 5BEGIN { $ENV{PERL_JSON_BACKEND} = 0; } 6use JSON::PP; 7######################### 8 9my $json = JSON::PP->new->allow_nonref; 10 11eval q| $json->decode('{foo:"bar"}') |; 12 13ok($@); # in XS and PP, the error message differs. 14 15$json->allow_barekey; 16 17is($json->decode('{foo:"bar"}')->{foo}, 'bar'); 18 19 20