淘先锋技术网

首页 1 2 3 4 5 6 7


http://www.cnblogs.com/CryOnMyShoulder/p/7755930.html

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