mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 11:05:28 -04:00
Apply simplification suggested by @johnjaylward.
This commit is contained in:
parent
b6ff0db984
commit
2a4bc3420a
@ -253,13 +253,12 @@ public class JSONObject {
|
||||
switch (x.nextClean()) {
|
||||
case ';':
|
||||
case ',':
|
||||
c = x.nextClean();
|
||||
if (c == 0) {
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
}
|
||||
if (c == '}') {
|
||||
if (x.nextClean() == '}') {
|
||||
return;
|
||||
}
|
||||
if (x.end()) {
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
}
|
||||
x.back();
|
||||
break;
|
||||
case '}':
|
||||
|
Loading…
x
Reference in New Issue
Block a user