Get the JSONObject associated with an index. @param index subscript @return A JSONObject value. @throws JSONException If there is no value for the index or if the value is not a JSONObject
(int index)
| 413 | * JSONObject |
| 414 | */ |
| 415 | public JSONObject getJSONObject(int index) throws JSONException { |
| 416 | Object object = this.get(index); |
| 417 | if (object instanceof JSONObject) { |
| 418 | return (JSONObject) object; |
| 419 | } |
| 420 | throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); |
| 421 | } |
| 422 | |
| 423 | /** |
| 424 | * Get the long value associated with an index. |
no test coverage detected