J
James Black
I have an application that relies on JSON, and I realized yesterday
that I when the user types at least some of these characters (most
likely all, haven't had time to verify) that the parser has problems:
, { } [ ] " '
How can I escape these characters so that it is in the file, but can
still be parsed?
For example:
{data: ["I want a quote, 'and so here it is', [with something in
brackets]'", "and {more data}"]}
I also had a problem when a newline ('\n') was entered, so I turn those
into '<br>'.
Thanx for any help.
that I when the user types at least some of these characters (most
likely all, haven't had time to verify) that the parser has problems:
, { } [ ] " '
How can I escape these characters so that it is in the file, but can
still be parsed?
For example:
{data: ["I want a quote, 'and so here it is', [with something in
brackets]'", "and {more data}"]}
I also had a problem when a newline ('\n') was entered, so I turn those
into '<br>'.
Thanx for any help.