use JSON; use Data::Dumper; my $json = encode_json( {HasAttachments => \0} ); # \0 is JSON false my $decoded = decode_json( $json ); print Dumper( $decoded->{HasAttachments} ); if ( $decoded->{HasAttachments} ) { print "HasAttachments is true"; } else { print "HasAttachments is false"; } # Prints: $VAR1 = bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ); HasAttachments is false
In reply to Re: how to decode JSON::PP::Boolean
by tangent
in thread how to decode JSON::PP::Boolean
by gabrielsousa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |