For what it's worth, yaml is JSON that allows comments (and a bunch of other syntax).
Then I discovered a handful of YAML parsers in various languages support code execution on parsing. Which basically killed YAML for me.
Have you ever written or tried to write a YAML parser?
Ok, we're being pedantic, perhaps it depends on how much information you put in a Yaml file, I usually see it used for small config files.
Also JSON + comment that's JSON5.
I don’t think anyone proposes switching to YAML for your API endpoints
I like JSON lines format where I can strip comment lines out.