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.”

  • Jared White ✌️ [HWC]@humansare.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    18 hours ago

    XML is very good for documents and other structured content formats. The problem is people took XML and used that for things that aren’t really documents. That led to a lot of people hating XML for the things it wasn’t good at and thus hating XML even for the things it is good at.

    I wish we could find a reasonable middle ground. I’d love to have a job where I work a lot more with XML to be honest!

  • FishFace@piefed.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    XML lost because it pretended to be human readable but it’s actually a soup of punctuation, and pretended to be good for machines but is heavy to parse and transmit.

    If there was an explanation for why XML lost to the likes of Avro and Thrift I didn’t spot it.

    I do think it’s a shame that the only real alternative to JSON is the much more complex yaml, but I’ll take it for most purposes.

    • wccrawford@discuss.online
      link
      fedilink
      arrow-up
      3
      ·
      23 hours ago

      It wasn’t even just that. In the companies I worked, it seemed like nobody other than me understood how to escape things for XML. I couldn’t even convince them to just use the right libraries/functions that auto-escape and parse things properly. They keep deciding they were smart enough to do it by hand. And it always ended up biting them.

      JSON, like Javascript (vs C++ or Java) is a lot more forgiving. It either works or it doesn’t, and the values are just strings or numbers. And some people even do the numbers as strings.

      • perviouslyiner@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        21 hours ago

        And some people even do the numbers as strings

        Fun JSON fact of the day: Why does JSON prohibit leading zeroes? Because in some parsers they will become octal!