← Back to context Comment by MrPatan 3 years ago Tabs are not valid JSON 3 comments MrPatan Reply zimpenfish 3 years ago Do you have a link for that?https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... says:> Insignificant whitespace may be present anywhere except within a JSONNumber [forbidden] or JSONString [interpreted as part of the string]And specifically lists tab as whitespace:> The tab character (U+0009), carriage return (U+000D), line feed (U+000A), and space (U+0020) characters are the only valid whitespace characters.More specifically, expanding https://datatracker.ietf.org/doc/html/rfc8259#section-2 gives an array as (roughly)> ws %x5B ws value (ws %x2C ws value)* ws %x5D wsWhere `ws` explicitly includes `%x09`. Which seems to cover this case? tonyg 3 years ago Per RFC 8259: ws = *( %x20 / ; Space %x09 / ; Horizontal tab %x0A / ; Line feed or New line %x0D ) ; Carriage return Someone 3 years ago The grammar in https://www.json.org/json-en.html disagrees. It has json element element ws value ws ws ‘0009’ ws
zimpenfish 3 years ago Do you have a link for that?https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... says:> Insignificant whitespace may be present anywhere except within a JSONNumber [forbidden] or JSONString [interpreted as part of the string]And specifically lists tab as whitespace:> The tab character (U+0009), carriage return (U+000D), line feed (U+000A), and space (U+0020) characters are the only valid whitespace characters.More specifically, expanding https://datatracker.ietf.org/doc/html/rfc8259#section-2 gives an array as (roughly)> ws %x5B ws value (ws %x2C ws value)* ws %x5D wsWhere `ws` explicitly includes `%x09`. Which seems to cover this case?
tonyg 3 years ago Per RFC 8259: ws = *( %x20 / ; Space %x09 / ; Horizontal tab %x0A / ; Line feed or New line %x0D ) ; Carriage return
Someone 3 years ago The grammar in https://www.json.org/json-en.html disagrees. It has json element element ws value ws ws ‘0009’ ws
Do you have a link for that?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... says:
> Insignificant whitespace may be present anywhere except within a JSONNumber [forbidden] or JSONString [interpreted as part of the string]
And specifically lists tab as whitespace:
> The tab character (U+0009), carriage return (U+000D), line feed (U+000A), and space (U+0020) characters are the only valid whitespace characters.
More specifically, expanding https://datatracker.ietf.org/doc/html/rfc8259#section-2 gives an array as (roughly)
> ws %x5B ws value (ws %x2C ws value)* ws %x5D ws
Where `ws` explicitly includes `%x09`. Which seems to cover this case?
Per RFC 8259:
The grammar in https://www.json.org/json-en.html disagrees. It has