public static ArrayListgetKeyValue(String JsonString){
ArrayListkeyList = new ArrayList();
String key="";
try {
JSONObject obj= new JSONObject(JsonString);
Iterator it = obj.keys();
while (it.hasNext()) {
key= (String)it.next().toString();
keyList.add(key);
}
} catch (JSONException e) {
e.printStackTrace();
}
return keyList;
}
网友评论