@ifixcoinops
There is a flavour of JSON that supports comments (JSONC) but of course it's non-standard and not supported in most JSON contexts. And it exists solely because of some programs insisting on keeping their configurations in JSON format, and config files *always* need comments...
I wasn't originally in favour of the choice of TOML (DOS/Windows ".ini" syntax on steroids) for the Python project config/metadata file, thinking YAML would have been better, but I've come around. YAML is still primarily suited for programs to write and parse. The fact that programmers can also write and parse it is useful, but doesn't mean it's suited for use as a general configuration file format to be used by normal people.
At least TOML they have a (small) chance of finding not too frustrating.
I suppose you could look at TOML (or even plain .ini) syntax for your unrelated thing, depending on its requirements.