在java的action里面怎么获取jquery的ajax提交过来的json数据,数据的格式是 5
[{"sDepartmentId":"006","sCarType":"C","iPlanNumber":"0"},{"sDepartmentId":"006","sCa...
[{"sDepartmentId":"006","sCarType":"C","iPlanNumber":"0"},{"sDepartmentId":"006","sCarType":"P","iPlanNumber":"0"},{"sDepartmentId":"006","sCarType":"N","iPlanNumber":"0"},{"sDepartmentId":"006","sCarType":"G","iPlanNumber":"0"},{"sDepartmentId":"006","sCarType":"T","iPlanNumber":"0"},{"sDepartmentId":"007","sCarType":"C","iPlanNumber":"0"},{"sDepartmentId":"007","sCarType":"P","iPlanNumber":"0"},{"sDepartmentId":"007","sCarType":"N","iPlanNumber":"0"},{"sDepartmentId":"007","sCarType":"G","iPlanNumber":"0"},{"sDepartmentId":"007","sCarType":"T","iPlanNumber":"0"},{"sDepartmentId":"004","sCarType":"C","iPlanNumber":"0"},{"sDepartmentId":"004","sCarType":"P","iPlanNumber":"0"},{"sDepartmentId":"004","sCarType":"N","iPlanNumber":"0"},{"sDepartmentId":"004","sCarType":"G","iPlanNumber":"0"},{"sDepartmentId":"004","sCarType":"T","iPlanNumber":"0"},{"sDepartmentId":"005","sCarType":"C","iPlanNumber":"0"},{"sDepartmentId":"005","sCarType":"P","iPlanNumber":"0"},{"sDepartmentId":"005","sCarType":"N","iPlanNumber":"0"},{"sDepartmentId":"005","sCarType":"G","iPlanNumber":"0"},{"sDepartmentId":"005","sCarType":"T","iPlanNumber":"0"}]
这样的,我在后台改怎样会的啊!求高手帮助一下,谢谢! 展开
这样的,我在后台改怎样会的啊!求高手帮助一下,谢谢! 展开
6个回答
展开全部
这种数据你编码成字符串后,把整个字符串发post请求,接收到后再用json工具类解析出来。http请求编码数组貌似提交不行。我以前直接干过这事,貌似出问题。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没有唯一标识符吗??你的数据
$.post(
"<%=basePath%>/chg", //url
{newpwd:$("#newpwd2").val()}, //参数
function(data){
$("#sp").html(data); //回调函数
},
"html"
);
String newpwd=request.getParameter("newpwd"); //获得新密码
$.post(
"<%=basePath%>/chg", //url
{newpwd:$("#newpwd2").val()}, //参数
function(data){
$("#sp").html(data); //回调函数
},
"html"
);
String newpwd=request.getParameter("newpwd"); //获得新密码
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用Google gson 就可以转了 Gson类有方法fromJson(str)
来自:求助得到的回答
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-01-27
展开全部
使用Struts的JSON插件,直接接收JSON数据
追问
能说的在详细些吗,能给我写个列子吗,谢谢!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |