There exists a peculiar amnesia in software engineering regarding XML. Mention it in most circles and you will receive knowing smiles, dismissive waves, the sort of patronizing acknowledgment reserved for technologies deemed passé. “Oh, XML,” they say, as if the very syllables carry the weight of obsolescence. “We use JSON now. Much cleaner.”

  • epyon22@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    24
    ·
    18 hours ago

    The fact that json serializes easily to basic data structures simplifies code so much. Most use cases don’t need fully sematic data storage much of which you have to write the same amount of documentation about the data structures anyways. I’ll give XML one thing though, schemas are nice and easy, but high barrier to entry in json.

    • Kissaki@programming.devOP
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      18 hours ago

      Most use cases don’t need fully sematic data storage

      If both sides have a shared data model it’s a good base model without further needs. Anything else quickly becomes complicated because of the dynamic nature of JSON - at least if you want a robust or well-documented solution.

      • [object Object]@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        7 hours ago

        If both sides have a shared data model

        If the sides don’t have a common understanding of the data structure, no format under the sun will help.

        • Kissaki@programming.devOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 hours ago

          The point is that there are degrees to readability, specificity, and obviousness, even without a common understanding. Self-describing data, much like self-describing code, is different from a dense serialization without much support in that regard.

      • lad@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        12 hours ago

        Yeah, when the same API endpoint sometimes return a string for an error, sometimes an object, and sometimes an array, JSON doesn’t help much in parsing the mess