利用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 關注
- 767 瀏覽
添加回答
舉報
0/150
提交
取消