Code example for JSONArray

Methods: getLong, isNull

0
            if (value != null) 
                array.put(index, (long) value); 
        } 
 
        public Long getValue(JSONArray array, int index) throws JSONException { 
            return array.isNull(index) ? null : array.getLong(index); 
        } 
    }; 
 
    public static final JSONTransformer<Double> DOUBLE = new JSONTransformer<Double>() { 
        public void setValue(JSONObject json, String key, Double value) throws JSONException { 
            if (value != null) 
                json.put(key, (double) value); 
        } 
 
        public Double getValue(JSONObject json, String key) throws JSONException { 
            return json.isNull(key) ? null : json.getDouble(key); 
        } 
 
        public void addValue(JSONArray array, Double value) throws JSONException { 
            if (value != null)