I 100% concur here that OP is mistaken, and must be doing something wrong. I was working heavily with the JSON objectified bool last week writing my GPS software. Here's an example that illustrates what the json->perl conversion looks like, and the resulting output before/after re-assignment:

use warnings; use strict; use Data::Dumper; use JSON; my $json = '{"true": true, "false": false}'; my $perl = decode_json $json; print Dumper $perl; my $t = $perl->{true}; my $f = $perl->{false}; print "orig true: $perl->{true}, var true: $t\n"; print "orig false: $perl->{false}, var false: $f\n"; __END__ $VAR1 = { 'false' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ), 'true' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ) }; orig true: 1, var true: 1 orig false: 0, var false: 0

In reply to Re^2: Getting JSON::PP:Boolean value by stevieb
in thread Getting JSON::PP:Boolean value by cormanaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.