欢迎来到皮皮网网站!

【asl源码】【idea打开类源码】【腾讯拦截管家源码】jqgrid源码

时间:2025-02-03 15:34:36 来源:app搜索列表源码

1.在js中将Action中响应的源码asl源码List转换为json格式该如何做?

jqgrid源码

在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());

更多相关资讯请点击【综合】频道>>>