mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-05 00:00:52 -05:00
Merge pull request #1009 from eleumik/eleumik-patch-1
Update JSONTokener.java for #1007
This commit is contained in:
@@ -509,6 +509,9 @@ public class JSONTokener {
|
||||
string = sb.toString().trim();
|
||||
if ("".equals(string)) {
|
||||
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);
|
||||
// if obj is a boolean, look at string
|
||||
|
||||
Reference in New Issue
Block a user