Your message dated Mon, 13 May 2013 00:30:44 +0100
with message-id <[email protected]>
and subject line Fixed a long time ago
has caused the Debian Bug report #566822,
regarding decode does not behave as documented
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
566822: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566822
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libjson-xs-perl
Version: 2.270-1
Severity: important
The documentation says this:
$perl_scalar = $json->decode ($json_text)
The opposite of "encode": expects a JSON text and tries to parse it,
returning the resulting simple scalar or reference. Croaks on error.
JSON numbers and strings become simple Perl scalars. JSON arrays
become
Perl arrayrefs and JSON objects become Perl hashrefs. "true" becomes
1,
"false" becomes 0 and "null" becomes "undef".
But this example
use JSON::XS ();
use Data::Dumper;
print Dumper(JSON::XS->new->decode('{"test":true}'));
results in the following output:
$VAR1 = {
'test' => bless( do{\(my $o = 1)}, 'JSON::XS::Boolean' )
};
Expected output, based on the documentation, is:
$VAR1 = {
'test' => 1
};
--
Florian Weimer <[email protected]>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
--- End Message ---
--- Begin Message ---
Version: 2.290-1
* Added details to Pod about decoding of JSON "true" and "false"
values. Closes #566822 (Thanks to Florian Weimer)
--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
--- End Message ---