Code example for JSONArray

Methods: lengthput

0
        } 
    } 
     
    static public void append(JSONArray a, boolean element) {
        try { 
            a.put(a.length(), element);
        } catch (JSONException e) {
        } 
    } 
     
    static public void append(JSONArray a, String element) {
        try { 
            a.put(a.length(), element);
        } catch (JSONException e) {
        } 
    } 
     
    static public void safePut(JSONObject obj, String key, int value) {
        try { 
            obj.put(key, value);
Contextual code suggestions in your IDE  Get Codota for Java