Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Perl structure to Javacript-ready JSON

by ikegami (Patriarch)
on Nov 26, 2014 at 14:18 UTC ( [id://1108454]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl structure to Javacript-ready JSON
in thread Perl structure to Javacript-ready JSON

If you know the JSON is valid, var data = {"abc":"abc'abc"}; is equivalent.

Replies are listed 'Best First'.
Re^4: Perl structure to Javacript-ready JSON
by LanX (Saint) on Nov 26, 2014 at 16:16 UTC
    To expand on this ...

    > If you know the JSON is valid

    ...even if there is a doubt about it's validity, he can wrap your approach into a try/catch expression.

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-28 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found