Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Formatting JSON the right way

by Anonymous Monk
on Aug 21, 2014 at 02:28 UTC ( [id://1098185]=note: print w/replies, xml ) Need Help??


in reply to Formatting JSON the right way

Construct a complete hashref structure containing the entire JSON packet that you want to transmit, then encode_json to prepare the string to send. When receiving data from the host, do the opposite with decode_json. In this way, the JSON encoder/decoder becomes a black-box and the text-string is a mystery that only the black-box needs to know how to handle.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found