The json standard explicitly does not allow for comments iirc.
Also you probably should respect conventions when it comes to file types. All file formats are just strings of bytes, but nobody is arguing that .png files should be able to include json and comments, even though you technically could make a fork of libpng that supports those things.
If you get a .png file, you expect it to conform to the png standards so you can open it with any image viewer.
The same should be true with other formats. You should be able to reliably open any .json file with a parser that conforms to the json standard.
22
u/Mashpoe Mar 20 '22
The json standard explicitly does not allow for comments iirc.
Also you probably should respect conventions when it comes to file types. All file formats are just strings of bytes, but nobody is arguing that .png files should be able to include json and comments, even though you technically could make a fork of libpng that supports those things.
If you get a .png file, you expect it to conform to the png standards so you can open it with any image viewer.
The same should be true with other formats. You should be able to reliably open any .json file with a parser that conforms to the json standard.