4 ms·
There's a lot of JSON tooling, and it's liable to interact badly with this. For example, a formatter might re-order the fields of a dict, moving "#comment-1" aw
by justinpombrio 5y ago
There's a lot of JSON tooling, and it's liable to interact badly with this. For example, a formatter might re-order the fields of a dict, moving "#comment-1" away from "version". Or the software that this JSON is for might error upon receiving unexpected keys (which is actually useful behavior, as that would catch a typo in an optional field).
Also, this doesn't let you put comments at the top of the file, or before a list item, or at the end of a line.
If you're going to change your JSON tooling to handle comments of some kind, you might as well go all the way to JSONC.