SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

问题现象

执行编辑操作,输入编辑的信息,保存时报错“操作异常[object Object],parsererror,SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data”。见下图

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

 

解决方案

代填页面填写的数据有问题,输入框中不能出现一对“<XXX>”,否则html无法解析。去除“<>”或者再添加一个“<>”。如“<http://198.0.0.123>”改成“<http://198.0.0.123><>”。

产生原因

html页面无法解析“<>”所导致的。实验证明:只包含一对“<>”无法保存,包含两对或其以上可以正常保存。