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();
}
|
本文转自 梦朝思夕 51CTO博客,原文链接:http://blog.51cto.com/qiangmzsx/1381864