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 ☆☆☆☆ :)