response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); JSONObject json=new JSONObject();//json给值省略response.getWriter().println(json.toString());