No need to worry about UTF-8 byes confused with delimiters, etc

Thanks to awesome UTF-8 design it never clashes with ASCII chars.
This commit is contained in:
Vladimir Grichina 2019-01-09 17:53:15 -08:00
parent bf4fffab1c
commit 16f40c4c8d

View File

@ -201,7 +201,6 @@ export class JSONDecoder<JSONHandlerT extends JSONHandler> {
for (;;) {
let byte = this.readChar();
assert(byte >= 0x20, "Unexpected control character");
// TODO: Make sure unicode handled properly
if (byte == '"'.charCodeAt(0)) {
stringParts.push(
String.fromUTF8(this.state.buffer.buffer.data + savedIndex, this.state.readIndex - savedIndex - 1));