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