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

Re^2: How do I tell if my code is using JSON::PP or JSON::XS?

by marto (Cardinal)
on Nov 19, 2020 at 06:20 UTC ( [id://11123817]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I tell if my code is using JSON::PP or JSON::XS?
in thread How do I tell if my code is using JSON::PP or JSON::XS?

Did you look at the JSON docs?

"This module is a thin wrapper for JSON::XS-compatible modules with a few additional features. All the backend modules convert a Perl data structure to a JSON text and vice versa. This module uses JSON::XS by default, and when JSON::XS is not available, falls back on JSON::PP, which is in the Perl core since 5.14. If JSON::PP is not available either, this module then falls back on JSON::backportPP (which is actually JSON::PP in a different .pm file) bundled in the same distribution as this module."

Replies are listed 'Best First'.
Re^3: How do I tell if my code is using JSON::PP or JSON::XS?
by perlfan (Vicar) on Nov 19, 2020 at 16:29 UTC
    I was replying to OP, I thought that ‘use JSON’ would detect the availability of the XS module and use it if possible, is that correct? I am really confused about your objection to my answer. I even qualified my answer with "perhaps". Maybe you can clarify exactly what your issue with my answer is because I have no idea what the point of your reply was.

      Your reply is flawed inasmuch as OP is correct, as per the docs I quoted/linked to use JSON; does as they believe it does. Your response doesn't answer that question and muddies the waters by introducing a different module. The answer to the question you quoted is in the module documentation.

        Still not clicking for me. I'll give it a few days to see if any of this makes sense to be because right it now doesn't. I don't give a shit about the negative XP but I do certainly care about "muddying the waters" or giving out bad info, which is the opposite of what I want to do.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-03-19 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found