Code example for JSONArray

Methods: getJSONObject

0
        } 
    } 
     
    static public JSONObject getObjectElement(JSONArray a, int i) {
        try { 
            return a.getJSONObject(i);
        } catch (JSONException e) {
            return null; 
        } 
    } 
     
    static public int getIntElement(JSONArray a, int i, int def) {
        try { 
            return a.getInt(i);
        } catch (JSONException e) {
            return def;
        } 
    } 
     
    static public void append(JSONArray a, JSONObject element) {
Contextual code suggestions in your IDE  Get Codota for Java