validation - validating JSON code -
the following bit of json code seen invalid in 2 independent validators (but have suspicion validators accept it). since know little json, please point out mistake?
{ "cz": "cz 51740018", "bod_id": "30476", "n": "", "e": "", "nazev": "ice\'n\'go\! cz s.r.o.", // <-- line has mistake "adresa": "pražská 2116/12a, 46601 jablonec nad nisou", "ddata": "", "typ_id": "0", "zdroj": "" }
jslint tells me backslashes problem (like ggzone said)
{ "cz" : "cz 51740018", "bod_id" : "30476", "n" : "", "e" : "", "nazev" : "ice'n'go! cz s.r.o.", // <-- fixed mistake "adresa" : "pražská 2116/12a, 46601 jablonec nad nisou", "ddata" : "", "typ_id" : "0", "zdroj" : "" }
if need keep escaped special characters in place, might try double escaping them :
{ "nazev" : "ice\\'n\\'go\\! cz s.r.o.", // <-- fine too. }
Comments
Post a Comment