首页 > Web开发 > 详细

Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null')

时间:2017-03-13 20:33:51      阅读:6820      评论:0      收藏:0      [点我收藏+]

Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token ‘name‘: was expecting (‘true‘, ‘false‘ or ‘null‘)

Ajax跨域问题

ajax提交添加下面两行代码

contentType:‘application/json;charset=utf-8‘
data:JSON.stringify(数据)

var allData = {
          name:"张三",
          age:20
         };
$.ajax({ type:
"POST", url: "xxxx", contentType:‘application/json;charset=utf-8‘, data:JSON.stringify(allData), success: function (data) { alert(data); } });

 

Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null')

原文:http://www.cnblogs.com/skyessay/p/6544738.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!