SyntaxError:JSON.parse:JSON数据角度2的第1行第1列中的意外字符 [英] SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data-angular 2

查看:515
本文介绍了SyntaxError:JSON.parse:JSON数据角度2的第1行第1列中的意外字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将数据发布到服务器时,我在数据库中收到此错误语法错误:JSON.parse:JSON数据第1行第1列的意外字符[了解更多]",但是无论如何,数据仍然进入数据库.可能有什么错误?

When i post data to my server , i get this error in my database " SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data[Learn More]" but anyway the data still goes into the database. What could be there error?

推荐答案

服务器很可能返回了错误页面(无效的JSON),请在开发人员工具的网络"标签中检查响应.

Most probably server returned error page (which is not valid JSON), check response in network tab in developer tools.

这篇关于SyntaxError:JSON.parse:JSON数据角度2的第1行第1列中的意外字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆