• @ClassifiedPancake@discuss.tchncs.de
    link
    fedilink
    2
    edit-2
    10 days ago

    Since XML can have attributes and children, it’s not as easy to convert to JSON.

    Your JSON example is more akin to:

    <address street_address="21 2nd Street" city="New York" ...></address>
    
    • @CanadaPlus
      link
      2
      edit-2
      9 days ago

      Hmm, so in tree terms, each node has two distinct types of children, only one of which can have their own children. That sounds more ambiguity-introducing than helpful to me, but that’s just a matter of taste. Can you do lists in XML as well?