diff --git a/core/src/processing/data/JSONArray.java b/core/src/processing/data/JSONArray.java index ba7555f04..6b579108f 100644 --- a/core/src/processing/data/JSONArray.java +++ b/core/src/processing/data/JSONArray.java @@ -619,6 +619,18 @@ public class JSONArray { // } + /** + * Append an String value. This increases the array's length by one. + * + * @param value A String value. + * @return this. + */ + public JSONArray append(String value) { + this.append((Object)value); + return this; + } + + /** * Append an int value. This increases the array's length by one. * @@ -762,6 +774,21 @@ public class JSONArray { } + /** + * Put or replace a String value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad + * it out. + * @param index The subscript. + * @param value A String value. + * @return this. + * @throws JSONException If the index is negative. + */ + public JSONArray setString(int index, String value) { + this.set(index, value); + return this; + } + + /** * Put or replace a long value. If the index is greater than the length of * the JSONArray, then null elements will be added as necessary to pad