Map<String, user> map = ad.getAttentionPatient("2");
JSONArray json = JSONArray.fromObject(map);
System.out.println(json.toString());//打印json格式数据
迭代读取
Map<String, user> map = ad.getAttentionPatient("2");
// 迭代map里的值
Iterator it=map.values().iterator();
while(it.hasNext()){
user u=(user) it.next();
}
原文:http://www.cnblogs.com/driftking/p/5190004.html