|
|
|
|
|
by iforgot22
527 days ago
|
|
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"}, ...]}
|
|