mirror of
https://github.com/fluencelabs/assemblyscript-json
synced 2025-04-25 06:42:24 +00:00
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:
parent
bf4fffab1c
commit
16f40c4c8d
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user