Hacker News new | ask | show | jobs
by arockwell 5932 days ago
My gut feeling on this is that almost anyone can recognize that writing JSON like that is wrong. However, trying to determine if

  <person first-name="John" last-Name="Smith" />
is better than

  <person>
      <first-name>John</first-name>
      <last-name>Smith</last-name>
  </person>
is often very difficult. In the wild, I've seen both strategies used depending on the situation.
1 comments

Actually it's very simple. If you don't need children don't make them. I measured it once and storing stuff in attributes had ~10 times faster parsing in MSXML.