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<Boolean> parseBooleanJsonList(JSONArray array) throws JSONException { if (array == null) { return new ArrayList<Boolean>(); } int size = array.length(); ArrayList<Boolean> list = new ArrayList<Boolean>(size); for (int i = 0; i < size; i++) { list.add(array.getBoolean(i)); } return list; } }