Subject: | Decoding JSON into a perl variable |
I am using v2.15 to encode/decode json objects. When I have a json
string and try to decode it back to a perl hash, it gives me an empty hash.
Here is my simple test code...
$text = '{"a":111, "b":222}';
%defaultValues = $json->decode($text);
while ( ($k,$v) = each %defaultValues ) {
print "$k => $v\n";
}
And all this prints is...
HASH(0x27d52e8) =>
Any ideas what's wrong here?
Thanks,