1
2
3
4
5
6
7
8
9
JSONArray json = JSONArray.fromObject(childNode.toArray());
         String s = json.toString();
         response.setContentType( "text/json; charset=UTF-8" );
         response.setCharacterEncoding( "UTF-8" );
         try  {
             response.getWriter().write(s);
         catch  (IOException e) {
             e.printStackTrace();
         }