@webref input:files @param filename name of a file in the data folder or a URL @see JSONArray @see PApplet#loadJSONObject(String) @see PApplet#saveJSONObject(JSONObject, String) @see PApplet#saveJSONArray(JSONArray, String)
(String filename)
| 6154 | * @see PApplet#saveJSONArray(JSONArray, String) |
| 6155 | */ |
| 6156 | public JSONArray loadJSONArray(String filename) { |
| 6157 | // can't pass of createReader() to the constructor b/c of resource leak |
| 6158 | BufferedReader reader = createReader(filename); |
| 6159 | JSONArray outgoing = new JSONArray(reader); |
| 6160 | try { |
| 6161 | reader.close(); |
| 6162 | } catch (IOException e) { // not sure what would cause this |
| 6163 | e.printStackTrace(); |
| 6164 | } |
| 6165 | return outgoing; |
| 6166 | } |
| 6167 | |
| 6168 | |
| 6169 | static public JSONArray loadJSONArray(File file) { |
nothing calls this directly
no test coverage detected