Hacker News new | ask | show | jobs
by Cthulhu_ 531 days ago
No it isn't, XML is an ecosystem with things like dedicated transfer protocols (EXI), schemas (XSD), transformers (XSLT) that JSON still doesn't have standardized/normalised even though JSON has been the norm for nearly 20 years. There's some projects of course (JSON Schema, OpenAPI), but they're separate and not part of the same standardization committee.
1 comments

I don't remember anything about the XML ecosystem, but XML is already a totally different format from JSON without considering that.

  <body myattr="yeah">
    <thing>hi</thing>
    <thing thingattr="cool">hi2</thing>
    <otherkindathing>hi2</otherkindathing>
  </body>
can be thought of as nested objects, each having a typename, text content, and children. It doesn't translate nicely to JSON. Maybe:

  {"type": "body", "attrs": {"myattr": "yeah"},
   "children": [{"type": "thing", "content": "hi"}, ...]}