Java tutorial
//package com.java2s; //License from project: Apache License import android.support.v4.util.ArrayMap; import org.json.JSONException; import org.json.JSONObject; import java.util.Iterator; import java.util.Map; public class Main { public static Map<String, String> parseStringJsonMap(JSONObject object) throws JSONException { Map<String, String> map = new ArrayMap<String, String>(); Iterator<String> keys = object.keys(); while (keys.hasNext()) { String key = keys.next(); map.put(key, object.getString(key)); } return map; } }