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, Double> parseDoubleJsonMap(JSONObject object) throws JSONException { Map<String, Double> map = new ArrayMap<String, Double>(); Iterator<String> keys = object.keys(); while (keys.hasNext()) { String key = keys.next(); map.put(key, object.getDouble(key)); } return map; } }