1# copied over from JSON::PP::XS and modified to use JSON::PP 2 3use strict; 4use Test::More; 5BEGIN { plan tests => 2 }; 6 7BEGIN { $ENV{PERL_JSON_BACKEND} = 0; } 8 9use JSON::PP; 10use Tie::Hash; 11use Tie::Array; 12 13my $js = JSON::PP->new; 14 15tie my %h, 'Tie::StdHash'; 16%h = (a => 1); 17 18ok ($js->encode (\%h) eq '{"a":1}'); 19 20tie my @a, 'Tie::StdArray'; 21@a = (1, 2); 22 23ok ($js->encode (\@a) eq '[1,2]'); 24