in reply to Perl structure to Javacript-ready JSON

Not sure why you would think that a JSON module should provide a hook for providing data that is not, well, just a different form of valid JSON.

Update: note really invalid, just not the simplest form.

--MidLifeXis

  • Comment on Re: Perl structure to Javacript-ready JSON

Replies are listed 'Best First'.
Re^2: Perl structure to Javacript-ready JSON
by LanX (Saint) on Nov 25, 2014 at 16:16 UTC
    > ... for providing data that is not, well, JSON.

    Shouldn't "\'" and "'" be synonymous in the end?

    Quoting of non-meta characters does no harm, at least in Perl.

    So I don't understand why it's not JSON, it might be redundant but it's still valid.

    Cheers Rolf

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

      Point taken, tested, and my response updated.

      It still seems, imo, that this is something outside of the scope of what the JSON module should be providing. I suppose, if one really wanted to, one could just escape every non-escaped character and be done with it.

      --MidLifeXis