Jtable返回Error而没有消息onload。响应返回200

时间:2015-12-10 23:15:13

标签: json jquery-jtable

我是jtable的新手。今天我尝试用来自服务器的数据设置我的网格。但是当我打电话时

jtable('load')

我在浏览器中看到200个结果,而我的json是正确但jtable返回错误弹出:enter image description here

这是代码的js部分: enter image description here

字段的命名方式与json相同。有人知道它有什么问题吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

解决。回应应采用以下格式:

{
 "Result":"OK",
 "Records":[
  {"PersonId":1,"Name":"Benjamin Button","Age":17,"RecordDate":"\/Date(1320259705710)\/"},
  {"PersonId":2,"Name":"Douglas Adams","Age":42,"RecordDate":"\/Date(1320259705710)\/"},
  {"PersonId":3,"Name":"Isaac Asimov","Age":26,"RecordDate":"\/Date(1320259705710)\/"},
  {"PersonId":4,"Name":"Thomas More","Age":65,"RecordDate":"\/Date(1320259705710)\/"}
 ]
}

文档:http://jtable.org/ApiReference/Actions