-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Tell us about your environment
- Node Version:16.11.0
- comment-json Version:4.2.3
Please show your use case / code slices / code link that could reproduce the issue
assert.equal(JSON.stringify('\x0B', null, 4), '"\\u000b"'); // Success
assert.equal(require('comment-json').stringify('\x0B', null, 4), '"\\u000b"') // AssertionError: '"\x0B"' == '"\\u000b"'
What did you expect to happen?
All control characters should be escaped, according to jsonc-scanner/scanner.ts#171
Are you willing to submit a pull request to fix this bug?
No. Reverting commit aa234e5 can fix it.