mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Revert "#863 replace usage of back() method in JSONObject parsing"
This reverts commit 5407423e439dfb4095e371666a65cf4f6603606d.
This commit is contained in:
parent
045324ab42
commit
a3f15e5883
@ -214,8 +214,8 @@ public class JSONObject {
|
|||||||
if (x.nextClean() != '{') {
|
if (x.nextClean() != '{') {
|
||||||
throw x.syntaxError("A JSONObject text must begin with '{'");
|
throw x.syntaxError("A JSONObject text must begin with '{'");
|
||||||
}
|
}
|
||||||
c = x.nextClean();
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
c = x.nextClean();
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 0:
|
case 0:
|
||||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||||
@ -252,13 +252,13 @@ public class JSONObject {
|
|||||||
switch (x.nextClean()) {
|
switch (x.nextClean()) {
|
||||||
case ';':
|
case ';':
|
||||||
case ',':
|
case ',':
|
||||||
c = x.nextClean();
|
if (x.nextClean() == '}') {
|
||||||
if (c == '}') {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (x.end()) {
|
if (x.end()) {
|
||||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||||
}
|
}
|
||||||
|
x.back();
|
||||||
break;
|
break;
|
||||||
case '}':
|
case '}':
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user