t/e00_func.t
raw| 1 | |
| 2 | use Test::More; |
| 3 | use strict; |
| 4 | BEGIN { plan tests => 2 }; |
| 5 | BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; } |
| 6 | use JSON; |
| 7 | ######################### |
| 8 | |
| 9 | my $json = JSON->new; |
| 10 | |
| 11 | my $js = 'abc'; |
| 12 | |
| 13 | |
| 14 | is(to_json($js, {allow_nonref => 1}), '"abc"'); |
| 15 | |
| 16 | is(from_json('"abc"', {allow_nonref => 1}), 'abc'); |
| 17 |