in reply to Re: Why is Dumper showing decoded JSON booleans like this?
in thread Why is Dumper showing decoded JSON booleans like this?
#!/usr/bin/perl -w use strict; use Data::Dumper; use JSON; use PHP::Serialization qw(serialize unserialize); my $json_text ='{ "boolean": true }'; my $json_text_decoded = decode_json $json_text; serialize($json_text_decoded);
OUTPUT:
Not a HASH reference at lib/PHP/Serialization.pm line 454.It dies when working on the object data type. Is there a straightforward way to convert the boolean object to a literal string?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why is Dumper showing decoded JSON booleans like this?
by ikegami (Patriarch) on Mar 03, 2010 at 20:18 UTC | |
by nleaman (Initiate) on Mar 04, 2010 at 21:01 UTC |