logoalt Hacker News

eviks12/09/20241 replyview on HN

why would you need that complex representation in the interoperable library instead of a much simpler one: a property, a comment, a comment, a value, a comment, ...?

This doesn't explode anything and you don't need to lose any data, so the monstrosity of XML still has no benefit, and neither does "createdAt$date", which would need a custom library anyway, so it doesn't matter where you insert your types


Replies

_heimdall12/09/2024

XML may have no benefit to you but it absolutely has benefit.

A bit off topic when the only consideration here is comments, but XML allows for type definitions and structures data that simply isn't possible in JSON.

People have found ways to attempt to add types to JSON but they aren't part of the spec at all and are just convention-based solutions.