Java tutorial
//package com.java2s; //License from project: Apache License import org.json.JSONArray; import org.json.JSONException; import java.util.ArrayList; import java.util.List; public class Main { public static List<Double> parseDoubleJsonList(JSONArray array) throws JSONException { if (array == null) { return new ArrayList<Double>(); } int size = array.length(); ArrayList<Double> list = new ArrayList<Double>(size); for (int i = 0; i < size; i++) { list.add(array.getDouble(i)); } return list; } }