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:
rikkarth
2024-03-30 18:44:51 +00:00
parent c0918c2428
commit 46534b56ad
3 changed files with 18 additions and 37 deletions

View File

@@ -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");
}