diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index ca7ba0ae9..fce0463b2 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -6119,6 +6119,12 @@ public class PApplet extends Applet /** * @webref output: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) */ public JSONObject loadJSONObject(String filename) { return new JSONObject(createReader(filename)); @@ -6126,6 +6132,11 @@ public class PApplet extends Applet /** * @webref output:files + * @see JSONObject + * @see JSONArray + * @see PApplet#loadJSONObject(String) + * @see PApplet#loadJSONArray(String) + * @see PApplet#saveJSONArray(JSONArray, String) */ public boolean saveJSONObject(JSONObject json, String filename) { return saveJSONObject(json, filename, null); @@ -6143,6 +6154,12 @@ public class PApplet extends Applet /** * @webref output:files + * @param filename name of a file in the data folder or a URL + * @see JSONObject + * @see JSONArray + * @see PApplet#loadJSONObject(String) + * @see PApplet#saveJSONObject(JSONObject, String) + * @see PApplet#saveJSONArray(JSONArray, String) */ public JSONArray loadJSONArray(String filename) { return new JSONArray(createReader(filename)); @@ -6150,6 +6167,11 @@ public class PApplet extends Applet /** * @webref output:files + * @see JSONObject + * @see JSONArray + * @see PApplet#loadJSONObject(String) + * @see PApplet#loadJSONArray(String) + * @see PApplet#saveJSONObject(JSONObject, String) */ public boolean saveJSONArray(JSONArray json, String filename) { return saveJSONArray(json, filename); diff --git a/core/src/processing/data/JSONArray.java b/core/src/processing/data/JSONArray.java index 2d74ef602..a12d7d197 100644 --- a/core/src/processing/data/JSONArray.java +++ b/core/src/processing/data/JSONArray.java @@ -92,6 +92,11 @@ import processing.core.PApplet; * @author JSON.org * @version 2012-11-13 * @webref data:composite + * @see JSONObject + * @see PApplet#loadJSONObject(String) + * @see PApplet#loadJSONArray(String) + * @see PApplet#saveJSONObject(JSONObject, String) + * @see PApplet#saveJSONArray(JSONArray, String) */ public class JSONArray { @@ -103,12 +108,16 @@ public class JSONArray { /** * Construct an empty JSONArray. + * @nowebref */ public JSONArray() { this.myArrayList = new ArrayList(); } + /** + * @nowebref + */ public JSONArray(Reader reader) { this(new JSONTokener(reader)); } @@ -152,6 +161,9 @@ public class JSONArray { } + /** + * @nowebref + */ public JSONArray(IntList list) { myArrayList = new ArrayList(); for (int item : list.values()) { @@ -160,6 +172,9 @@ public class JSONArray { } + /** + * @nowebref + */ public JSONArray(FloatList list) { myArrayList = new ArrayList(); for (float item : list.values()) { @@ -168,6 +183,9 @@ public class JSONArray { } + /** + * @nowebref + */ public JSONArray(StringList list) { myArrayList = new ArrayList(); for (String item : list.values()) { @@ -658,10 +676,10 @@ public class JSONArray { /** * Append an String value. This increases the array's length by one. * + * @webref jsonarray:method + * @brief Appends a String value, increasing the array's length by one * @param value A String value. * @return this. - * @webref jsonarray:method - * @brief Append an String value. This increases the array's length by one. */ public JSONArray append(String value) { this.append((Object)value); @@ -959,9 +977,9 @@ public class JSONArray { /** * Get the number of elements in the JSONArray, included nulls. * - * @return The length (or size). * @webref jsonarray:method - * @brief Get the number of elements in the JSONArray, included nulls + * @brief Gets the number of elements in the JSONArray, included nulls + * @return The length (or size). */ public int size() { return myArrayList.size(); @@ -982,11 +1000,10 @@ public class JSONArray { /** * Remove an index and close the hole. * - * @param index The index of the element to be removed. - * @return The value that was associated with the index, - * or null if there was no value. * @webref jsonarray:method * @brief Remove an index and close the hole + * @param index The index of the element to be removed. + * @return The value that was associated with the index, or null if there was no value. */ public Object remove(int index) { Object o = this.opt(index); diff --git a/core/src/processing/data/JSONObject.java b/core/src/processing/data/JSONObject.java index 589066d8b..a4fdc5dcc 100644 --- a/core/src/processing/data/JSONObject.java +++ b/core/src/processing/data/JSONObject.java @@ -104,6 +104,11 @@ import processing.core.PApplet; * @author JSON.org * @version 2012-12-01 * @webref data:composite + * @see JSONArray + * @see PApplet#loadJSONObject(String) + * @see PApplet#loadJSONArray(String) + * @see PApplet#saveJSONObject(JSONObject, String) + * @see PApplet#saveJSONArray(JSONArray, String) */ public class JSONObject { /** @@ -189,6 +194,7 @@ public class JSONObject { /** * Construct an empty JSONObject. + * @nowebref */ public JSONObject() { this.map = new HashMap(); @@ -215,6 +221,9 @@ public class JSONObject { // } + /** + * @nowebref + */ public JSONObject(Reader reader) { this(new JSONTokener(reader)); } @@ -299,6 +308,9 @@ public class JSONObject { } + /** + * @nowebref + */ public JSONObject(IntDict dict) { map = new HashMap(); for (int i = 0; i < dict.size(); i++) { @@ -307,6 +319,9 @@ public class JSONObject { } + /** + * @nowebref + */ public JSONObject(FloatDict dict) { map = new HashMap(); for (int i = 0; i < dict.size(); i++) { @@ -315,6 +330,9 @@ public class JSONObject { } + /** + * @nowebref + */ public JSONObject(StringDict dict) { map = new HashMap(); for (int i = 0; i < dict.size(); i++) {