On the Fediverse also as @[email protected]

Можете да намерите и като @[email protected]

Abito in Italia @[email protected]

  • 4 Posts
  • 12 Comments
Joined 9 months ago
cake
Cake day: January 12th, 2024

help-circle














  • In both XML and JSON you have lists and embedding hierarchichies (I use this term to abstract away from dictionaries/maps which are not exactly represented in XML). These allow for browsing/iterating and filtering when after a particular node.

    One difference is that nodes in XML are named (tags). Another thing that you have in XML and not in JSON is attributes. A good example of their use is querying by tag name, node id or class attributes in HTML (which is a loose example of XML). To do the equivalent in JSON, you need to work with keys and values which are less structured and (arguably as consequence) often missing such meta-data. HTML is a popular example, but pretty much any XML has ids and other meta tags and attributes. JSON standards typically don’t and it’s a long separate topic whether this is due to the characteristics of the format itself.

    PS: another big difference is that XML also allows for comments, which allows to also encode intent, not only content.