The JSON spec asks for whitespace after {, [ and before and after the value, but every JSON validator don't need whitespaces to consider a JSON valid and I've never seen a non-prettified JSON with whitespaces. It doesn't say they are optional, even though they clearly don't need to be there.
@sevvie I was quite surprised too, but I guess it makes sense since it's supposed to be human readable
Yes, it does say that they are optional:
-------------
Insignificant whitespace is allowed before or after any of the six
structural characters.
ws = *(
%x20 / ; Space
%x09 / ; Horizontal tab
%x0A / ; Line feed or New line
%x0D ; Carriage return
)
---------------
"allowed", not required.
@matrix don't forget that comments are not allowed in JSON.
Since you need to be able to put comments into JSON sometimes, a lot of parsers will allow JavaScript style comments.
@matrix@gameliberty.club I wonder if this was added specifically for some known buggy implementation at the time