in reply to Getting JSON::PP:Boolean value
Could you show an SSCCE that reproduces the issue? It works fine for me:
use Data::Dump; use JSON::PP; my $data = decode_json(q{ { "foo":true, "bar":false } }); dd $data; my ($foo,$bar) = ($data->{foo},$data->{bar}); print "foo=$foo, bar=$bar\n"; __END__ { bar => bless(do{\(my $o = 0)}, "JSON::PP::Boolean"), foo => bless(do{\(my $o = 1)}, "JSON::PP::Boolean"), } foo=1, bar=0
Update: You mention "mod JSON", but the above code works for me exactly the same no matter if I do use JSON;, use JSON::XS;, or use JSON::PP;. I also added the Data::Dump output to show these are indeed JSON::PP::Boolean objects.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting JSON::PP:Boolean value
by cormanaz (Deacon) on May 24, 2017 at 13:20 UTC |