json用法大全

	    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();
		}

  

你可能感兴趣的:(json用法大全)