mirror of
https://github.com/stleary/JSON-java.git
synced 2025-10-01 14:25:55 -04:00
parent
9b8eefc2de
commit
686c084897
@ -509,6 +509,9 @@ public class JSONTokener {
|
|||||||
string = sb.toString().trim();
|
string = sb.toString().trim();
|
||||||
if ("".equals(string)) {
|
if ("".equals(string)) {
|
||||||
throw this.syntaxError("Missing value");
|
throw this.syntaxError("Missing value");
|
||||||
|
} else if (jsonParserConfiguration != null &&
|
||||||
|
jsonParserConfiguration.isStrictMode() && string.endsWith(".")) {
|
||||||
|
throw this.syntaxError(String.format("Strict mode error: Value '%s' ends with dot", string));
|
||||||
}
|
}
|
||||||
Object obj = JSONObject.stringToValue(string);
|
Object obj = JSONObject.stringToValue(string);
|
||||||
// if obj is a boolean, look at string
|
// if obj is a boolean, look at string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user