mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-10 12:34:30 +08:00
feat(#871-strictMode): removed allowSingleQuotes
test(#871-strictMode): adjusted related tests, add more test cases for non-compliant quotes in strict mode
This commit is contained in:
@@ -472,9 +472,8 @@ public class JSONTokener {
|
||||
|
||||
Object nextSimpleValue(char c, JSONParserConfiguration jsonParserConfiguration) {
|
||||
boolean strictMode = jsonParserConfiguration.isStrictMode();
|
||||
boolean allowSingleQuotes = jsonParserConfiguration.isAllowSingleQuotes();
|
||||
|
||||
if(strictMode && !allowSingleQuotes && c == '\''){
|
||||
if(strictMode && c == '\''){
|
||||
throw this.syntaxError("Single quote wrap not allowed in strict mode");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user