r/programming • u/joanmiro • Jul 18 '16
Web programming is getting unnecessarily complicated
http://en.arguman.org/web-programming-is-getting-unnecessarily-complicated
324
Upvotes
r/programming • u/joanmiro • Jul 18 '16
View all comments
Show parent comment
1
u/kenfox Jul 20 '16
JSON object attributes are unordered, just like HTML element attributes are unordered. If you want ordered children, use a JSON array. HTML works exactly the same way, though it's not obvious until you see the "childNodes" property on HTML elements loaded into memory.
I guess it's a matter of taste whether the array syntax in JSON is better/worse than the element close syntax in HTML.
Anyways, that's one reason that JSON is strangely popular. It's good for trees. :)