3 ms·
...and before you know it, your system that is built using various third party libraries contains 'JSON' files with various comment conventions: - # in col
by Someone 15y ago
...and before you know it, your system that is built using various third party libraries contains 'JSON' files with various comment conventions:
- # in column 1
- # in column 1, backslash at end of line escapes the newline
- # as first non-blank
- # as first non-blank, backslash at end of line escapes the newline
- -- as first non-blank
- C-style multi-line slash-asterisk comment asterisk-slash
- C++-style //
- Python style doc strings
etc.
Then somebody will attempt to write the comment filter that will handle them all, somebody else will make a JSON parser that round-trips all different versions. Net result: a JSON 'standard' that is ugly and leads to parsers that are larger then necessary, not 100% reliable (how do you guess whether a backslash at the end of line escapes the newline?)
I would rather have a simple standard with one kind of comment.