Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-standard whitespace handling #46

Closed
ak1394 opened this issue Jul 19, 2021 · 0 comments
Closed

Non-standard whitespace handling #46

ak1394 opened this issue Jul 19, 2021 · 0 comments
Assignees
Milestone

Comments

@ak1394
Copy link

ak1394 commented Jul 19, 2021

The scanner in node-jsonc-parser allows multiple non-standard whitespace chars to be accepted as a whitespace:

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.

@aeschli aeschli added this to the October 2021 milestone Oct 25, 2021
@aeschli aeschli self-assigned this Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants