Lines Matching refs:encode
12 eval q| $json->encode( [ sub {} ] ) |;
15 eval q| $json->encode( [ \-1 ] ) |;
16 ok( $@ =~ /cannot encode reference to scalar/, $@ );
18 eval q| $json->encode( [ \undef ] ) |;
19 ok( $@ =~ /cannot encode reference to scalar/, $@ );
21 eval q| $json->encode( [ \{} ] ) |;
22 ok( $@ =~ /cannot encode reference to scalar/, $@ );
26 is( $json->encode( [ sub {} ] ), '[null]' );
27 is( $json->encode( [ \-1 ] ), '[null]' );
28 is( $json->encode( [ \undef ] ), '[null]' );
29 is( $json->encode( [ \{} ] ), '[null]' );
37 eval q| $json->encode( [ $fh ] ) |;
38 ok( $@ =~ /encountered GLOB|cannot encode reference to scalar/, $@ );
42 is( $json->encode( [ $fh ] ), '[null]' );