Code example for JSONArray

Methods: getDoubleisNull

            if (value != null) 
                array.put(index, (double) value); 
        public Double getValue(JSONArray array, int index) throws JSONException { 
            return array.isNull(index) ? null : array.getDouble(index); 
    public static final JSONTransformer<Boolean> BOOLEAN = new JSONTransformer<Boolean>() { 
        public void setValue(JSONObject json, String key, Boolean value) throws JSONException { 
            if (value != null) 
                json.put(key, (boolean) value); 
        public Boolean getValue(JSONObject json, String key) throws JSONException { 
            return json.isNull(key) ? null : json.getBoolean(key); 
        public void addValue(JSONArray array, Boolean value) throws JSONException { 
Connect your IDE to all the code out there  Get Codota for Java