4 ms·
What problem did XML solve that JSON is still trying to?
by LAC-Tech 4y ago
What problem did XML solve that JSON is still trying to?
- cxr 4y agoMixed content: <https://news.ycombinator.com/item?id=21397111 https://news.ycombinator.com/item?id=21397111>
- miffy900 4y agoXML's implementation for this is surprisingly intuitive. But to be fair, who tries to use JSON for modelling something like this? You're better off just embedding the XML in a JSON string: {"markup": "<div>The <a href=\"https://www.json.org/\">JSON https://www.json.org/\">JSON format</a> was invented by <em>Douglas Crockford</em>.</div>"} Most JSON is consumed in the browser, which also has an XML/HTML parser engine sitting alongside the JSON one.
- GoblinSlayer 4y agoAFAIK some matrix client wanted json markup for messages.
- cxr 4y ago> to be fair, who tries to use JSON for modelling something like this? There are people who hold the opinion that "Everything XML wanted to be, JSON did better." <https://news.ycombinator.com/item?id=28667089 https://news.ycombinator.com/item?id=28667089>
- TedDoesntTalk 4y agoComments. And before you mention JSON5, so you know anyone who uses it?