VM349:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1

VM349:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1

解决方法
返回的数据已经是object类型,不需要再进行JSON.parse()转换了,可以直接当作对象使用。
原先代码

 var json=JSON.parse(msg);
  var returnCode=json.returnCode;

直接改为

 var returnCode=msg.returnCode;

相关文章: