MCPcopy Index your code
hub / github.com/benfry/processing4 / getString

Method getString

core/src/processing/data/JSONObject.java:581–591  ·  view source on GitHub ↗

Gets the String value associated with the specified key. @webref jsonobject:method @webBrief Gets the String value associated with the specified key @param key a key string @return A string which is the value. @throws RuntimeException if there is no string value for the key. @see JSON

(String key)

Source from the content-addressed store, hash-verified

579 * @see JSONObject#getBoolean(String)
580 */
581 public String getString(String key) {
582 Object object = this.get(key);
583 if (object == null) {
584 // Adding for rev 0257 in line with other p5 api
585 return null;
586 }
587 if (object instanceof String) {
588 return (String)object;
589 }
590 throw new RuntimeException("JSONObject[" + quote(key) + "] is not a string");
591 }
592
593
594 /**

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
quoteMethod · 0.95
optMethod · 0.95
equalsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected