ExtJS发送json请求,服务端如何解析啊?比如批量新增记录的时候

如题,当一个grid批量新增记录或修改记录的时候,extjs一次性发送json请求,服务端该如何解析啊?以前都是用querystring和form来得到请求的参数,可是这个如何做呢?

如何把Ext.data.store里的数据一次性用JSON传给后台(添加了后台解析部分)
前台部分很简单:

首先定义一个数组,用来储存STORE里的值。

之后利用store自带的each遍历方法把数组填满。

最后建一个ajax请求传送到后台即可。

var lstAddRecord=new Array();

store.each(function(record) {

  lstAddRecord.push(record.data); 

});

Ext.Ajax.request({

url: 'function/rivaldata/rivalDataAction.do?tag=add', 

params: {strJson:Ext.encode(lstAddRecord)} 

});

后台解析部分:

主要是利用了JSON-Lib包,实现了关键功能。

String strJson=request.getParameter("strJson");
JSONArray js=JSONArray.fromObject(strJson);
JSONObject jo=null;
Iterator it=js.iterator();
while(it.hasNext()){
jo=(JSONObject)it.next();
//follow codes are get the value :)
String goodId=jo.getString("goodId");
Double goodsPrice=jo.getDouble("goodsPrice");
//ok, to do something use the vaules:)
System.out.println("the goodId is :"+goodId);
}

使用json解析包
String querystring = request.getParameter("querystring"); //获取json字符串数据
JSONArray.toList(JSONArray.fromObject(querystring),beanClass); //解析映射BEAN