I'm not sure about that - I think your second example will parse to "parent": [{"child": "name"}] in JSON
Re:XML is better than YAML
by KnobbleMcKnees on Thursday September 21, 2023 @10:18AM
(#37597998)
Yeah this was what I was going for, same point stands
XML claims to solve the problem of attributes vs children but then falls short at the first hurdle by not discerning between a single complex object as an attribute and an array of complex objects as children.
JSON and YAML do not have this problem as they are explicit in their representation.
YAML example:
vs Try converting each of these to JSON. The former will give you an object property called child, the latter will give you an array property called child with one element