4 ms·
Validate Your YAML
- blueflow 4y ago... perfect reasoning to use XML instead.
- nathants 4y agoare you serious?
- blueflow 4y agoYeah? Yaml was like, invented to not be bound by an schema like XML is. So instead of re-adding an Schema to Yaml, switch back to XML and have all the Schema tooling inclusive, like XSLT and such. I think this is a bit of a NIH problem...
- nathants 4y agoit’s just data though. json, yaml, xml, bytes in a file, they are all capable of representing the same data. why validate them all indifferent ways? their syntax is different, but their semantics, or some common subset, is identical.
- verdverm 4y agoCUE is more readable than XSD, works with several common formats, and addresses problems beyond just validating a config / data format
- blueflow 4y agoI find JSON and XML more readable than YAML, since the semantics (what is a dictionary, what is a list) of items are more explicit by the use of punctuation and quoting characters.
- nathants 4y agovalidating yaml, or any input data, is likely a good idea. does the validation have to be based on a human readable schema though? i’ve started manually validating yaml the hard way, and writing human readable but otherwise useless schemas. it feels like a reasonable approach. schema: https://github.com/nathants/libaws#infrayaml https://github.com/nathants/libaws#infrayaml manual validation the hard way: https://github.com/nathants/libaws/blob/26fe86c65bbb0ea63ca7d6728836a146964f7c10/lib/infra.go#L2492 https://github.com/nathants/libaws/blob/26fe86c65bbb0ea63ca7...