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."

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

Replies are listed 'Best First'.
Re^3: How do I tell if my code is using JSON::PP or JSON::XS?
by perlfan (Parson) 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.