0
这里是我的Ajax调用请求数据,以Ajax调用转换为JS对象
$.ajax({
url:'http://localhost:8081/organizations/',
data: JSON.stringify({"name":"karthik"}),
type: 'POST',
dataType :'json',
processData : true,
success: (function(response){ alert("response "+response);}),
error: (function(err){ console.log(err); })
});
在API中,当我试图打印request.data,为什么我收到这样{u'{"name":"karthik"}': [u'']}
阅读此问题应该可以帮到你。 http://stackoverflow.com/questions/17785592/difference-between-json-stringify-and-json-parse –