为什么Struts2用Map得不到正确的格式,有关的是json,jquery的flexigrid问题

@SuppressWarnings("unchecked")
  public String execute() throws Exception {
  int startIndex = (page - 1) * rp; // 计算查询开始数据下标
  total = uManger.pageTotalCount();
  List list = uManger.queryuserList(rp, startIndex);
  for (Iterator iterator = list.iterator(); iterator.hasNext();) {
  user = (UserInfo) iterator.next();
  Map cellMap = new HashMap();
  cellMap.put("userid", user.getUserid());
  cellMap.put("cell", new Object[] { user.getUserid(),
  user.getUserName(), user.getUserEmail(),
  user.getUserPhone(), user.getCreateTime() });
  rows.add(cellMap);
  System.out.println(cellMap.toString());
  }
  return SUCCESS;
  }


打印出来是
[{cell=[Ljava.lang.Object;@ed65e0, userid=123}, {cell=[Ljava.lang.Object;@1bb953
3, userid=admin}, {cell=[Ljava.lang.Object;@406b09, userid=3}]

面我要的格式是:
 {"total":200,"page":2,  
 "rows":[{"userid":"1","cell":["a","b","c","e"]}  
 {"userid":"2","cell":["a","b","c","e"]},  
 {"userid":"3","cell":["a","b","c","e"]},  
 {"userid":"4","cell":["a","b","c","e"]},  
 {"userid":"5","cell":["a","b","c","e"]}
 ]} 

你可能感兴趣的:(jquery,C++,c,json,C#)