- 注册时间
- 2013-9-27
- 最后登录
- 2019-8-31
- 阅读权限
- 10
- 积分
- 347
- 精华
- 0
- 帖子
- 80
|
Factory版主:请教下,
按照 前面你说的方法:
我将对象的转为Json格式后 传回到后台去,格式如下:
[{"tm1":{"ID":"1","KSDA":"2","FLAG":"Y","FLAG_BZ":"test"},"tm2":{"ID":"2","KSDA":"1","FLAG":"Y","FLAG_BZ":"test"}}]
然后,在后台通过:ArrayList 去调用后台数据处理过程。
String json = Request["data"];
ArrayList rows = (ArrayList)JSON.Decode(json);
提示,类型转换错误:
System.InvalidCastException: 无法将类型为“System.Collections.Hashtable”的对象强制转换为类型“System.Collections.ArrayList”
想问下,要传回什么样格式的Json?
我另外有查看其它DataGrid传回的数据格式:
[{"PID":2,"TXMC":"单选题","NDFB":null,"TMSL":null,"MTFS":"2","ID":4,"SORT":1,"_id":45,"_uid":45,"_state":"modified"},{"PID":2,"TXMC":"简答题","NDFB":null,"TMSL":null,"MTFS":"5","ID":7,"SORT":1,"_id":48,"_uid":48,"_state":"modified"}]
和前面的也差不多的,
|
|