1.在js中将Action中响应的源码metasploit源码解析List转换为json格式该如何做?
在js中将Action中响应的List转换为json格式该如何做?
List li=UserDAO.list();
JSONArray array = JSONArray.fromObject(li);
JSONObject object=new JSONObject();
try {
object.accumulate("list", li);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//array.add(object);
response.getWriter().write(array.toString());