{{
"draw": "1",
"recordsFiltered": 670,
"recordsTotal": 670,
"books": []
}}
这是从web api返回的响应json数据..我怎样才能取消它?
这是asp.net web api方法:
public JsonResult GetBooks(){
..
return new JsonResult()
{
Data = new { draw = draw, recordsFiltered = totalRecords, recordsTotal = totalRecords, data = booklist },
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
这个技巧让我疯狂,当我在浏览器中发出相同的请求时,它会响应有效的json字符串:
{
"draw": "1",
"recordsFiltered": 670,
"recordsTotal": 670,
"books": []
}
但是当我在客户端调试模式中检查响应的内容时,你会看到一个额外的范围侵蚀数据..有人可以在joniour开发人员自杀前描述stuation ..