@@ -31,6 +31,7 @@ of this software and associated documentation files (the "Software"), to deal
3131import java .util .ArrayList ;
3232import java .util .Collection ;
3333import java .util .Iterator ;
34+ import java .util .ListIterator ;
3435import java .util .Map ;
3536
3637/**
@@ -69,27 +70,33 @@ of this software and associated documentation files (the "Software"), to deal
6970 * <li>Strings do not need to be quoted at all if they do not begin with a quote
7071 * or single quote, and if they do not contain leading or trailing spaces, and
7172 * if they do not contain any of these characters:
72- * <code>{ } [ ] / \ : , #</code> and if they do not look like numbers and
73+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and
7374 * if they are not the reserved words <code>true</code>, <code>false</code>, or
7475 * <code>null</code>.</li>
76+ * <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as
77+ * well as by <code>,</code> <small>(comma)</small>.</li>
7578 * </ul>
7679 *
7780 * @author JSON.org
78- * @version 2013-04-18
81+ * @version 2012-11-13
7982 */
8083public class JSONArray {
8184
8285 /**
8386 * The arrayList where the JSONArray's properties are kept.
8487 */
85- private final ArrayList myArrayList ;
88+ public final ArrayList myArrayList ;
8689
8790 /**
8891 * Construct an empty JSONArray.
8992 */
9093 public JSONArray () {
9194 this .myArrayList = new ArrayList ();
9295 }
96+
97+ public ListIterator <Object > listIterator (){
98+ return this .myArrayList .listIterator ();
99+ }
93100
94101 /**
95102 * Construct a JSONArray from a JSONTokener.
@@ -115,6 +122,7 @@ public JSONArray(JSONTokener x) throws JSONException {
115122 this .myArrayList .add (x .nextValue ());
116123 }
117124 switch (x .nextClean ()) {
125+ case ';' :
118126 case ',' :
119127 if (x .nextClean () == ']' ) {
120128 return ;
0 commit comments