码迷,mamicode.com
首页 > Web开发 > 详细

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

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

标签:exce   代码   gif   cat   lld   alert   false   content   xxx   

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')

标签:exce   代码   gif   cat   lld   alert   false   content   xxx   

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

(4)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!