josdejong / josdejong/jsoneditor

JSON spec does not allow the literal tab character

Open
#575 4 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
12.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

JSON spec does not allow the literal tab character, but jsoneditor is not flagging it as invalid.

According to http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf:
> Insignificant whitespace is allowed before or after any token. The whitespace characters are: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Whitespace is not allowed within any token, except that space is allowed in strings.

The above means that a literal tab character is not allowed inside a JSON string. It is only allowed if escaped as \t (in a .json-file):

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.