News for hackers. Stuff that matters.
Re:XML is better than YAML by kaba0 on Wednesday September 20, 2023 @02:46PM (#37588266)
But one of them has schema descriptions to prevent these errors as soon as possible.
Re:XML is better than YAML by Groxx on Wednesday September 20, 2023 @03:27PM (#37588840)
Sure, if you define and use it. Same as yaml schemas (they exist!).

XML has them sorta built in (basically all (notable) libraries support them), but it's not like it's required or somehow innately protected because of that. It's just a bit easier to adopt.

Re:XML is better than YAML by matsemann on Wednesday September 20, 2023 @04:51PM (#37590002)
But my case was with a yaml validated to a schema. A kube ingress file with a list of rules. My additional dash made it a new entry, in practice allowing everything. With xml it would have been very explicit that I now accidentally had made two rules.
Re:XML is better than YAML by throwawaymaths on Wednesday September 20, 2023 @07:20PM (#37591344)
> But one of them has schema descriptions

JSONSchema? It's pretty standardized and well accepted.

Re:XML is better than YAML by NBJack on Wednesday September 20, 2023 @07:50PM (#37591590)
I believe XML has it baked directly into the official spec. JSONSchema is great, but I wouldn't call it a standard yet, and anecdotally I haven't seen it as often as I'd like in use (i.e. I either need to run kubectl --dry-run or use a separate third party solution to validate my changed yaml).
Re:XML is better than YAML by meepmorp on Wednesday September 20, 2023 @08:20PM (#37591777)
XML schema is a separate spec.
Re:XML is better than YAML by kaba0 on Thursday September 21, 2023 @01:42AM (#37593613)
Read the title - just because YAML is a superset of JSON, doesn’t mean you can check every YAML file with JSOnSchema.