public String getdormitorylist(int page, int rows) {
List<Dormitory> list = dormitoryDaoImpl.getdormitorylist(page, rows);
int total = userDaoImpl.getAllRowCount("Dormitory");
HashMap hm = new HashMap();
hm.put("rows", list);
hm.put("total", total);
Gson gson = new Gson();
String s = gson.toJson(hm);
return s;
}
我这里返回的是一个List<Dormitory> list ,向页面传json时,怎么将Dormitory中的对象major的major_name回传?