Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by GrandFather (Saint)
on Nov 16, 2020 at 03:35 UTC ( [id://11123678]=note: print w/replies, xml ) Need Help??


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

You can:

my $json = JSON->new; print "Using JSON::XS\n" if $json->is_xs();

See the JSON choosing backend documentation and (further down in the documentation) the additional methods section for is_xx and related methods.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^2: How do I tell if my code is using JSON::PP or JSON::XS?
by Cody Fendant (Hermit) on Nov 17, 2020 at 19:57 UTC
    Thanks! I really should RTFM shouldn’t I?

      Indeed. The thought had crossed my mind :-D.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?
Username:
Password:

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

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

    No recent polls found