logoalt Hacker News

AdieuToLogic12/09/20241 replyview on HN

How does defining a YAML resource strictly in terms of well-formed JSON + octothorpe comments introduce "the mountain of footguns that YAML brings with it"?


Replies

ratorx12/09/2024

It doesn’t, quoting strings does solve almost all issues, but it does leave potential footguns for the future.

If you don’t enforce it, in the future the “subset of YAML” property might get weaker, especially if someone else is modifying the config.

If you treat config files the same as code, then using a safe subset of YAML is the same as using a safe subset of C. It is theoretically doable, but without extensive safeguards, someone will eventually slip up.