JsonConfig config = new JsonConfig();
config.setExcludes(new String[]{"books","booktype"});
JSONArray array = new JSONArray();
//JSONObject jsonObject = new JSONObject();
//String t = jsonObject.fromObject(booktypetop, config).toString();
String t = array.fromObject(booktypestop, config).toString();
ServletActionContext.getResponse().setContentType("text/html;charset=utf-8");
ServletActionContext.getResponse().getWriter().print(t);
使用哪个对象就是传回去上面数据。