mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-10 12:34:30 +08:00
fix(#887): regressions, unit tests
- JSONArray now evaluates EOF accordingly for empty Array inputs. - JSONTokener fixed indentation - externalized two JSONMLTest cases
This commit is contained in:
@@ -136,9 +136,13 @@ public class JSONArray implements Iterable<Object> {
|
||||
case ']':
|
||||
if (strictMode) {
|
||||
cursor = x.nextClean();
|
||||
boolean isNotEoF = !x.end();
|
||||
boolean isEoF = x.end();
|
||||
|
||||
if (isNotEoF && x.getArrayLevel() == 0) {
|
||||
if (isEoF) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (x.getArrayLevel() == 0) {
|
||||
throw x.syntaxError(getInvalidCharErrorMsg(cursor));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user