Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的服务器返回以下 json 对象:
{"Success":0,"ex":"The system cannot find the file specified"}
当我运行时,var response = jQuery.parseJSON(data)我收到以下错误:
var response = jQuery.parseJSON(data)
SyntaxError: JSON.parse: 意外字符
有人可以指出我正确的方向吗?谢谢!
parseJSON用于将JSON 字符串解析为Javascript 对象。看起来你已经有了这个对象,你确定data是一个字符串吗?
parseJSON
data