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

Method loadJSONObject

core/src/processing/core/PApplet.java:6085–6095  ·  view source on GitHub ↗

@webref input:files @param filename name of a file in the data folder or a URL @see JSONObject @see JSONArray @see PApplet#loadJSONArray(String) @see PApplet#saveJSONObject(JSONObject, String) @see PApplet#saveJSONArray(JSONArray, String)

(String filename)

Source from the content-addressed store, hash-verified

6083 * @see PApplet#saveJSONArray(JSONArray, String)
6084 */
6085 public JSONObject loadJSONObject(String filename) {
6086 // can't pass of createReader() to the constructor b/c of resource leak
6087 BufferedReader reader = createReader(filename);
6088 JSONObject outgoing = new JSONObject(reader);
6089 try {
6090 reader.close();
6091 } catch (IOException e) { // not sure what would cause this
6092 e.printStackTrace();
6093 }
6094 return outgoing;
6095 }
6096
6097
6098 /**

Callers

nothing calls this directly

Calls 3

createReaderMethod · 0.95
closeMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected