Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: JSON::XS and blessings

by cshavit (Novice)
on Oct 13, 2015 at 20:30 UTC ( [id://1144754]=note: print w/replies, xml ) Need Help??


in reply to Re^3: JSON::XS and blessings
in thread JSON::XS and blessings

Indeed. Likewise false has a similar problem. Turns out that the other special case, null roundtrips just fine.

And like I said, everything works fine from a shell command line, and in one of the virtual hosts. It's the other VirtualHost that causes problems.

Replies are listed 'Best First'.
Re^5: JSON::XS and blessings (bless \1)
by tye (Sage) on Oct 13, 2015 at 22:26 UTC

    Of course null causes no problem; that just gets mapped to undef. true and false get mapped to bless $Class, \$bool. It appears that one of your systems is blessing into a class that is not special-cased in the other direction. Perhaps this is because the TO_JSON() method is not being defined. But, no, I have no idea why it gets defined on one server and not on the other. Surely, there are differences between the servers, despite you thinking that there are none.

    - tye        

Log In?
Username:
Password:

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

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

    No recent polls found