- Notifications
You must be signed in to change notification settings - Fork 59
Closed
Milestone
Description
The scanner in node-jsonc-parser allows multiple non-standard whitespace chars to be accepted as a whitespace:
node-jsonc-parser/src/impl/scanner.ts
Line 392 in ff813e9
function isWhiteSpace(ch: number): boolean { |
However, JSON specification allows only a handful of whitespace chars:
ws = *( %x20 / ; Space %x09 / ; Horizontal tab %x0A / ; Line feed or New line %x0D ) ; Carriage return
Difference in whitespace handling leads to interop problems with other JSON parsers, where input successfully parsed by node-jsonc-parser would fail to parse in Node or Python.
todashuta
Metadata
Metadata
Assignees
Labels
No labels