我收到一个 jQuery AJAX 调用错误,返回 200 成功代码和响应上的 parseerror。我假设这意味着 jQuery 得到了数据但无法解析它。但是,我可以检索响应数据,它是格式良好的 JSON。
我正在使用 jsonp 数据进行跨域服务。
jQuery
jQuery.ajax({
url: ServiceBasePath + "/json/ZipRiders",
dataType: "jsonp",
success: function (data) {
...
},
error: function (a,b,c) {
alert(a, b, c);
}
});
错误数据
a: Object { readyState=4, status=200, statusText="success", more...}
b: "parsererror"
c: Error: jQuery1101020726428059127155_1377610175566 was not called
回复
[
{
"AdDescription": "Taking 75 north instead of 23 just for fun",
"AdID": "---",
"CityName": "Highland",
"IsWanted": false,
"Latitude": "42.656281",
"Longitude": "-83.63297",
"Name": "Ride to Milford, MI",
"NetworkLogon": "---",
"RideNotifyEnable": true,
"UserName": "---"
},
{
"AdDescription": "Ride to jackson",
"AdID": "---",
"CityName": "Jackson",
"IsWanted": false,
"Latitude": "42.252268",
"Longitude": "-84.38842",
"Name": "Ride to Jackson, MI",
"NetworkLogon": "---",
"RideNotifyEnable": true,
"UserName": "---"
},
{
...
},
{
...
},
...
]