I agree, but you can do context switchs also without having comments. For instance, the JSON Schema defines (Source: https://json-schema.org/latest/json-schema-core.html#rfc.sec...)
{
'$comment': "string that can hold whatever you want"
}
and it is obvious that you can embed any other language in a string.
With comments in a data transmission format you will end up with things like "conditional comments" in IE.
I agree there are certainly many better configuration languages.