JSONObject遍历获取键值

public static void main(String[] args) throws JSONException {
String str = "{FYXID:4C4600835174411190C739805DE593BC,ZFY:0,FYXMC:保安保洁费}";
JSONObject jsonObject = new JSONObject(str);
Iterator<String> it = jsonObject.keys(); 
while(it.hasNext()){
// 获得key
String key = it.next(); 
String value = jsonObject.getString(key);    
System.out.println("key: "+key+",value:"+value);
}

 

用的miniui的例子调了一个下午终于TM调好了,有空再把miniUI excelExport导出的贴上

posted @ 2017-10-30 18:56  迷神图卷  阅读(76978)  评论(1编辑  收藏  举报