Ideally, you would use TOML for human-readable configuration and document your JSON API with external documentation instead of sending comments around a bunch. If you need to display the description to the end user though, that would be a valid use case.
json with comments can be parsed by a yaml parser. It's how I write yaml, in fact (yaml is a superset of json. any valid json is valid yaml, but it also supports comments)
A lot of good answers but I would add one note:
Of course it does!
{ comment: "This data is super important and it runs the system or something", data: ["Some", "stuff", "here"] }
You disgust me
This is actually pretty genius, why haven't ever thought of that?
It's so easy to use, and you can read the comments from in your program too!
^(in case you weren't just playing along, please never do comments this way)
I liked the idea to be honest. I can just call the entry "description" instead and all is good ^^
Ideally, you would use TOML for human-readable configuration and document your JSON API with external documentation instead of sending comments around a bunch. If you need to display the description to the end user though, that would be a valid use case.
I believe the JSON deserializer .NET ships with has options to allow C#-style comments in JSON files.
json with comments can be parsed by a yaml parser. It's how I write yaml, in fact (yaml is a superset of json. any valid json is valid yaml, but it also supports comments)
JSON5 is a superset of JSON that supports comments.