Closed mh61503891 closed 8 years ago
this.push(JSON.parse(chunk))
When chunk
including \t
, the \t
must be escaped with \
according to RFC4627 JSON https://www.ietf.org/rfc/rfc4627.txt, page 4.
Check:
coffee> JSON.parse('["\\t"]')
[ '\t' ]
coffee> JSON.parse('["\t"]')
SyntaxError: Unexpected token
at Object.parse (native)
[...]
Additional replacement processes to escape extended characters (e.g., tab, backspace, etc.) are needed in Function JsonSafe.
The replacement rule are written in RFC 4627 Section "2.5. Strings" https://www.ietf.org/rfc/rfc4627.txt, page 4.
Hi @mh61503891
Would you be so kind as to post a small code snippet that replicates this problem so we can work on it?
Thanks
Yaniv
@mh61503891 bump
No response from submitting party, closing this issue for now
For example, "Adobe Acrobat Reader DC - Japanese" writes following entry to registry when installing:
This entry has a data including new lines and tabs, and the regedit.list() throws SyntaxError when reading above entry as follow:
Probably, this SyntaxError occurred if data includes tab (s). To check this, I have inputed a tab into other entry by regedit.exe then regedit.list() throws same error.