3 ms·
You can just use JSON with comments though. If you have sufficient control over the technology in question to be able to completely change it to a YAML parser,
by basil-rash 8y ago
You can just use JSON with comments though. If you have sufficient control over the technology in question to be able to completely change it to a YAML parser, surely you can change it to be a JSON+Comment parser too. See: VS Code's config files.
- jhanschoo 8y agoBut you can restrict yourself to JSON+Comments and call it YAML; it isn't idiomatic YAML, but it's still valid YAML.
- saagarjha 8y ago> You can just use JSON with comments though. Then it's not valid JSON, and if you try to treat it as such bad things will happen.
- basil-rash 8y agoMy point is that if you're in sufficient control of the stack to be able to convert the whole thing over to YAML, you could just as easily convert the whole thing over to JSON+Comments. And of course bad things would happen if you treat JSON+Comments as JSON, but similar bad things would happen if you treat YAML as JSON, so I don't see your point. It's not like people are trying to send their tsconfig's on the wire as "application/json" and expecting arbitrary parsers to support it.