利用mvc3返回json,这种格式"{\"page\":1,\"rows\":[{\"cell\":[\"ALFKI\",\"Alfreds Futterkiste\",\"Maria Anders\",\"Sales Representative\",\"Obere Str. 57\",\"Berlin\",\"\",\"12209\",\"Germany\",\"030-0074321\",\"030-0076545\"],\"id\":\"ALFKI\"},。。。。。和这种格式{"page":1,"total":91,"rows":[{"id":"ALFKI","cell":["ALFKI","Alfreds Futterkiste","Maria Anders","Sales Representative","Obere Str. 57","Berlin","","12209","Germany","030-0074321","030-0076545"]},哪种正确,可是不管哪种,都显示不出表格数据,而是在页面中直接输出了json数据。求大神解答
2 回答
慕运维8079593
TA贡献1876条经验 获得超5个赞
都可以,貌似是你的数据错了:
cell是对象不是数组:
{"page":"1","total":239,"rows":[{"id":"x1","cell":{"y1":"y1"}},{"id":"x2","cell":{"y2":"y2"}}]}
- 2 回答
- 0 关注
- 724 浏览
添加回答
举报
0/150
提交
取消