News for hackers. Stuff that matters.
Re:The YAML Document from Hell by throwawaymaths on Thursday January 12, 2023 @12:20PM (#34357105)
No. XML is broken for structured data that isn't HTML because it's not really clear (there aren't even "best practices" afaict) what should be a text node, what should be an attribute node, and what should be a subtag node.
Re:The YAML Document from Hell by int_19h on Thursday January 12, 2023 @04:20PM (#34360386)
It's not like other formats don't face similar questions. E.g. if you have a list of key-value pairs to serialize to JSON, do you translate those keys to JSON properties in an object, or do you translate each pair as an object in an array?
Re:The YAML Document from Hell by throwawaymaths on Thursday January 12, 2023 @04:59PM (#34360840)
The motivation for doing that in JSON comes with best practices: you use the key-value objects thing if and only if you have an ad-hoc list of items that you'd really really like to shove into a well-typed schema.