You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an app that was giving unterminated string constant exceptions in jQuery/Firefox and Illegal Character exceptions in jQuery/Chrome. I ran my JSON content through JSONLint and it reported the content as valid.
After looking into it, I found that my JSON had unescaped unicode characters (smart quotes).
I modified my code to escape unicode chars in the format \uxxxx and my app is now working.
So, it looks like jsonlint is passing as correct JSON content that has unicode and that's not correct.
The text was updated successfully, but these errors were encountered:
The JSON spec allows un-escaped Unicode characters other than " or \ or "control characters" in strings.
I ran into trouble once where the quotes surrounding strings were smart quotes, but that did not pass validation. And you wouldn't want to escape those anyway.
I had an app that was giving unterminated string constant exceptions in jQuery/Firefox and Illegal Character exceptions in jQuery/Chrome. I ran my JSON content through JSONLint and it reported the content as valid.
After looking into it, I found that my JSON had unescaped unicode characters (smart quotes).
I modified my code to escape unicode chars in the format \uxxxx and my app is now working.
So, it looks like jsonlint is passing as correct JSON content that has unicode and that's not correct.
The text was updated successfully, but these errors were encountered: