Skip to content

Commit 9b89bbc

Browse files
Initial commit.
1 parent 34f327e commit 9b89bbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1871
-1594
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/build
2+
/jar
3+
/.gradle
4+
/.classpath
5+
/.DS_Store
6+
/.project
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
#Thu Aug 01 20:22:57 BST 2013
3+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
4+
org.eclipse.jdt.core.compiler.compliance=1.6
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
7+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
8+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
9+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
10+
eclipse.preferences.version=1
11+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12+
org.eclipse.jdt.core.compiler.source=1.6
13+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

JSONArray.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ of this software and associated documentation files (the "Software"), to deal
3131
import java.util.ArrayList;
3232
import java.util.Collection;
3333
import java.util.Iterator;
34+
import java.util.ListIterator;
3435
import 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
*/
8083
public 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

Comments
 (0)