Syntax-error

Related

JSON Parse报错: Unterminated string

我在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为有效的。
2024-08-14 16:28:24
Get connected with us on social networks! Twitter

©2024 Guangzhou Sinephony Technology Co., Ltd All Rights Reserved