Javaweb中 Uncaught SyntaxError: Unexpected token o in JSON at position 1
2017-03-17 18:24
686 查看
已解决:因为servlet(或者服务端)返回的就是json格式字符串,我前端又将其转化成json,就会报错。
比如:
此处的data已是json 格式,所以删掉下面那句话就好了。
比如:
$.post('${path}/DemptDeleteServlet?ids='+id,function(data){ var json=$.parseJSON(data);
此处的data已是json 格式,所以删掉下面那句话就好了。
相关文章推荐
- primefaces 推送服务报Uncaught SyntaxError: Unexpected token < in JSON at position 0
- 【已解决】Uncaught SyntaxError: Unexpected token in JSON at position 0
- 代码中出现:Uncaught SyntaxError: Unexpected token o in JSON at position 1
- 【已解决】Uncaught SyntaxError: Unexpected token o in JSON at position 1
- VM356:1 Uncaught SyntaxError: Unexpected token i in JSON at position 1
- 【已解决】Uncaught SyntaxError: Unexpected token o in JSON at position 1
- Uncaught (in promise) SyntaxError: Unexpected token o in JSON at position 1
- 解决方法 Uncaught SyntaxError: Unexpected token < in JSON at position 0
- 关于Uncaught SyntaxError- Unexpected token o in JSON at position 1,chrome持续报错的相关解析
- js获取富文本编辑器的值之后报错Uncaught SyntaxError: Unexpected token 发 in JSON at position 0
- VM356:1 Uncaught SyntaxError: Unexpected token i in JSON at position 1
- Uncaught SyntaxError: Unexpected token o in JSON at position 1
- angular1.5.3.min.js:116 SyntaxError: Unexpected token g in JSON at position 63
- Uncaught SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token s in JSON at position 111518
- Uncaught SyntaxError: Unexpected token < in JSON at position 0
- js常见报错之Unexpected token in JSON at position
- 模块引用文件路径问题js报错和Unexpected token in JSON at position
- JSON.parse() Unexpected token i in JSON at position 2 报错问题
- Ajax报错之Unexpected token S in JSON at position