File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -619,6 +619,18 @@ public boolean[] getBooleanArray() {
619619// }
620620
621621
622+ /**
623+ * Append an String value. This increases the array's length by one.
624+ *
625+ * @param value A String value.
626+ * @return this.
627+ */
628+ public JSONArray append (String value ) {
629+ this .append ((Object )value );
630+ return this ;
631+ }
632+
633+
622634 /**
623635 * Append an int value. This increases the array's length by one.
624636 *
@@ -762,6 +774,21 @@ public JSONArray setInt(int index, int value) {
762774 }
763775
764776
777+ /**
778+ * Put or replace a String value. If the index is greater than the length of
779+ * the JSONArray, then null elements will be added as necessary to pad
780+ * it out.
781+ * @param index The subscript.
782+ * @param value A String value.
783+ * @return this.
784+ * @throws JSONException If the index is negative.
785+ */
786+ public JSONArray setString (int index , String value ) {
787+ this .set (index , value );
788+ return this ;
789+ }
790+
791+
765792 /**
766793 * Put or replace a long value. If the index is greater than the length of
767794 * the JSONArray, then null elements will be added as necessary to pad
You can’t perform that action at this time.
0 commit comments