Subject: | decode() behaviour not as documented for true/false |
http://search.cpan.org/~makamaka/JSON-2.12/lib/JSON.pm#decode says:
"true becomes 1, false becomes 0 and null becomes undef"
But:
$ perl -MJSON -MData::Dumper -e 'print Dumper from_json("{ \"arg\": true
}")'
$VAR1 = {
'arg' => bless( do{\(my $o = 1)}, 'JSON::XS::Boolean' )
};
The behaviour/docs for JSON::XS are the same.
From the above documentation snippet, I would have expected { arg => 1 }
here, which is what I get using JSON::Syck.