json数据的话,在后台,你可以定义好实体类型,然后来进行转换,有名的转换工具是fastjson,可以转成java对象,list对象等等各种复杂的
//拼装JSON格式数据json
var json={"edit":[{"bh":"11111","mc":"11111","dbms":"ORACLE9i","dwmmc":"","addr":"","username":"","password":"","rm_sz":"ck","nyr_sz":"","id":"-1"},{"bh":"121","mc":"12","dbms":"ORACLE9i","dwmmc":"12","addr":"12","username":"12","password":"12","rm_sz":"ck","nyr_sz":"2011-09-06","id":"13"}],"del":["12"]};
var post={data:JSON.stringify(json)};//JSON.stringify(json)把json转化成字符串
$.post(url,post);
……
后台简要代码:
……
JSONObject json=JSONObject.fromObject(request.getParameter("data"));
List