asp.net mvc - SyntaxError: JSON.parse: expected ',' or '}' after property value in object -


i got error when convert json string javascript object. json string contains double quotes {"name":"dem"o"} proper way handle double quotes when parse json string?

the json string contains double quotes {"name":"dem"o"}

that's invalid json. cannot parse it. if want able parse string json parser need have valid json in first place. make sure have valid json:

{"name":"dem\"o"} 

to ensure never end such broken strings, never build them manually - always use json serializer when creating json string. handle , escape values.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -