This circle is for discussion of techniques about HTML, CSS, and JavaScript, including various frontend frameworks.
我在JSON parse函数中使用转义引号时,遇到了一个常见的问题。如果存在转义引号,在本例中为“test”,则会导致以下错误'SyntaxError: JSON Parse error: Unterminated string'.var information = JSON.parse('[{"-1":"24","0":"","1":"","2":"","3":"0.0000","4":"","5":"0.00","6":"0.00","7":"1.00","8":"0","9":"false","10":"false","11":[""],"12":"","13":"","14":"test\""}]');JSON Lint验证该JSON为有效的。