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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -