MCPcopy Index your code
hub / github.com/processing/processing / getJSONObject

Method getJSONObject

core/src/processing/data/JSONArray.java:542–548  ·  view source on GitHub ↗

Get the JSONObject associated with an index. @webref jsonobject:method @brief Gets the JSONObject associated with an index value @param index the index value of the object to get @return A JSONObject value. @throws RuntimeException If there is no value for the index or if the value is not a JSONObj

(int index)

Source from the content-addressed store, hash-verified

540 * @see JSONArray#setJSONArray(int, JSONArray)
541 */
542 public JSONObject getJSONObject(int index) {
543 Object object = this.get(index);
544 if (object instanceof JSONObject) {
545 return (JSONObject)object;
546 }
547 throw new RuntimeException("JSONArray[" + index + "] is not a JSONObject.");
548 }
549
550
551 public JSONObject getJSONObject(int index, JSONObject defaultValue) {

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected