Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: How do I make the JSON module convert true/false to 1/0 instead of a blessed Boolean object?

by ikegami (Patriarch)
on Jan 04, 2022 at 15:09 UTC ( [id://11140137]=note: print w/replies, xml ) Need Help??


in reply to Re^5: How do I make the JSON module convert true/false to 1/0 instead of a blessed Boolean object?
in thread How do I make the JSON module convert true/false to 1/0 instead of a blessed Boolean object?

JSON.pm isn't a parser. It's just a front-end for JSON::PP or JSON::XS. So one most definitely needs JSON::PP or JSON::XS.

Maybe you meant one doesn't need to use JSON::PP directly, but the parent post was clear that JSON.pm was the module being used directly.

Replies are listed 'Best First'.
Re^7: How do I make the JSON module convert true/false to 1/0 instead of a blessed Boolean object?
by pryrt (Abbot) on Jan 04, 2022 at 15:38 UTC
    JSON.pm isn't a parser. It's just a front-end ...

    Sorry, you're right, I hadn't remembered that JSON.pm just calls one of the others as a back end.

    but the parent post was clear that JSON.pm was the module being used directly.

    The original post was clear that JSON.pm was the module originally being used directly. However, in the message I replied to, Cody Fendant said, "Upgrading JSON::PP and specifically using that has fixed it.", where I interpreted° "specially using that" as meaning "calling use JSON::PP instead of use JSON". And as you stated, and as my code shows, you do not have to specifically use JSON::PP in order to get it to work correctly, so one of my points -- that you can get it to work while calling JSON.pm directly -- is still valid.

    edit: °... Though I see, after reading your other posts, that another possible reading is that they were manually selecting that JSON.pm use the JSON::PP backend. So maybe we've just been talking past each other, with different base assumptions on what certain phrasings implied. I agree with everything you said, but wanted to leave this as a clarification of what I said earlier.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140137]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2024-03-28 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found