4 ms·
The attribute versus child conundrum in XML specification is largely absent in JSON. Ordered versus unordered children is still a puzzle to sort out but more of
by hinkley 6y ago
The attribute versus child conundrum in XML specification is largely absent in JSON. Ordered versus unordered children is still a puzzle to sort out but more of a special case.
In XML, there was always some motherfucker trying to stuff CSV into an attribute.
And the difference between ID as specified and ID as implemented lead to a lot of problems, reaching its zenith (or maybe nadir?) in the XML Signature spec.
- GoblinSlayer 6y agoHow would you represent CSV in JSON?
- krapp 6y agoAn array of maps - each map is a row, each key a column.
- petre 6y agoOr an array of arrays with a TOC containing the keys to index mapping. Keeps the column order and it's more compact because it omits the keys in the data.
- hinkley 6y agoI meant the specific case of someone trying to stick three values into an attribute but the other responder covered the general case. If you need three values use an array (or in xml, child element)