> Another concern with comments is that apps might try to (ab)use them […]
There's no "might" about. This is exactly what happened in the early/beta days of JSON, per Douglas Crockford, creator of JSON:
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.
There is a big but though: whether the loss of interoperability for those cases was any real loss. Those people wanted their own files parsed a specific way by their own infrastructure. Their files already weren't meant for every regular JSON parser: if they wanted wider interoperability they'd had dropped those comments.
And nobody stops them from continuing to use those meta-parsing semantics even if JSON-standards prohibits comments.
I think Crockford was wrong in his objection. It shouldn't have been his concern.
And nobody stops them from continuing to use those meta-parsing semantics even if JSON-standards prohibits comments.
I think Crockford was wrong in his objection. It shouldn't have been his concern.