This commit is contained in:
Looly
2023-05-20 01:27:18 +08:00
parent d09c0ff058
commit 25eca5dba7
2 changed files with 34 additions and 1 deletions

View File

@@ -248,9 +248,14 @@ public class JSONTokener extends ReaderWrapper {
c = this.next();
switch (c) {
case 0:
throw this.syntaxError("Unterminated string");
case '\n':
case '\r':
throw this.syntaxError("Unterminated string");
//throw this.syntaxError("Unterminated string");
// https://gitee.com/dromara/hutool/issues/I76CSU
// 兼容非转义符
sb.append(c);
break;
case '\\':// 转义符
c = this.next();
switch (c) {