We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e89dd7 commit 22d2c76Copy full SHA for 22d2c76
java/src/json/ext/EscapeScanner.java
@@ -64,6 +64,20 @@ public static EscapeScanner create(byte[] escapeTable) {
64
return new ScalarEscapeScanner(escapeTable);
65
}
66
67
+ public static class BasicScanner implements EscapeScanner {
68
+ @Override
69
+ public boolean scan(EscapeScanner.State state) throws java.io.IOException {
70
+ while (state.pos < state.len) {
71
+ state.ch = Byte.toUnsignedInt(state.ptrBytes[state.ptr + state.pos]);
72
+ if (state.ch >= 0 && (state.ch < ' ' || state.ch == '\"' || state.ch == '\\')) {
73
+ return true;
74
+ }
75
+ state.pos++;
76
77
+ return false;
78
79
80
+
81
public static class ScalarEscapeScanner implements EscapeScanner {
82
private final byte[] escapeTable;
83
0 commit comments