Parsing Double Quotes Within Json
I'm trying to parse some JSON I'm receiving from a third-party API. The problem is that some of the JSON has quotes inside quotes, like this: var json = '{'sentence': 'My favorite
Solution 1:
That is not valid JSON, so you cannot do it with standard methods.
You either have to escape the quotes like this: "sport is \" "
or else you need to write your own sanitizer
Post a Comment for "Parsing Double Quotes Within Json"