I found when JSON string contains control character, like \n, simdjson will raise UNESCAPED_CHARS error, which is different from some other JSON parsers that allow such characters. Simdjson expects literal control characters are used. For example, literal new line character (represented by \\n) is allowed. The below code decides this behavior:
|
if (buf[idx] < 0x20) { error = UNESCAPED_CHARS; } |
.
Is it an expected behavior to simdjson user? And do we need to allow those characters in some way? E.g., let it depend on user's build option.