Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: 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:14 UTC ( [id://11140138]=note: print w/replies, xml ) Need Help??


in reply to Re^4: 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?

Since you're installing modules anyway, why not install JSON::XS. Doing so will make JSON.pm a "million" times faster.

Caveat: It doesn't support threads.

Note: I don't use JSON.pm because it defaults to the slow JSON::PP. I used to use JSON::XS directly.

Note: I don't use JSON::XS because of the author's attitude and his unwillingness to support threads and who knows what else. I use Cpanel::JSON::XS directly.

JSON.pm supports Cpanel::JSON::XS, but requires the use of an env var. That said, it doesn't support boolean_values.

  • Comment on Re^5: How do I make the JSON module convert true/false to 1/0 instead of a blessed Boolean object?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found