I have a valid JSON:
{"name":"tono","html":"<p><a href=\"http:\/\/someurl.com\">Here<\/a> is the link<\/p>"}
But, when I parse it through javascript (I use firefox's console)
JSON.parse('{"name":"tono","html":"<p><a href=\"http:\/\/someurl.com\">Here<\/a> is the link<\/p>"}');
I get this error
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 36 of the JSON data
Is it an expected behavior? And how to parse JSON which contains URL correctly?
Just for additional information, this one works:
JSON.parse('{"name":"tono","html":"<p><a href=>Here<\/a> is the link<\/p>"}');
Object { name: "tono", html: "<p><a href=>Here</a> is the link</p>" }
More additional information:
The JSON parsed flawlessly here: http://jsonviewer.stack.hu
Here<\/a> is the link<\/p>"}'` string and you'll spot the problem.
– zerkms Oct 05 '15 at 22:11Here<\/a> is the link<\/p>"};`
– Barmar Oct 05 '15 at 23:39