• @schnurrito@discuss.tchncs.de
    link
    fedilink
    2711 days ago

    IMHO: XML is a file format, JSON is a data transfer format. Reinventing things like RSS or SVG to use JSON wouldn’t be helpful, but using XML to communicate between your app’s frontend and backend wouldn’t be either.

    • Skull giver
      link
      fedilink
      English
      21
      edit-2
      1 day ago

      [This comment has been deleted by an automated system]

      • @MonkderVierte@lemmy.ml
        link
        fedilink
        411 days ago

        The amount of config.jsons I’ve had to mess with…

        Yeah, json is not a good config format. As much as xml is not. Please use something like YAML or TOML.

        • @sysop@lemmy.world
          link
          fedilink
          711 days ago

          I never moved away from ini I’ve just been sititng back watching you all re-invent the wheel over and over and over and over and over.

          • @reinei@lemmy.world
            link
            fedilink
            2
            edit-2
            10 days ago

            It’s a wheel, it’s supposed to turn over and over and over and infinitum!

            /S (because it’s big sarcasm instead of small.)

        • @toastal@lemmy.ml
          link
          fedilink
          English
          111 days ago

          I wish more things used Nickel or Dhall for config. I don’t know why I wouldn’t want editor support for type information or the ability to make functions in my non-Turing-complete config to eliminate boilerplate on my end.

      • Of course you can use XML that way, but it is unnecessarily verbose and complex because you have to make decisions, like, whether to store things as attributes or as nested elements.

        I stand by my statement that if you’re saving things to a file you should probably use XML, if you’re transferring data over a network you should probably use JSON.

        • @sik0fewl@lemmy.ca
          link
          fedilink
          1611 days ago

          Why? JSON hasn’t given us anything XML hasn’t, except maybe a bit of terseness.

          I do agree SOAP is a bit over engineered, though, but that’s not the fault of XML.

          • exu
            link
            fedilink
            English
            511 days ago

            XML is much more annoying to read/write by hand

          • xigoi
            link
            English
            110 days ago

            A big advantage of JSON over YAML is that it can be parsed directly into common data structures (arrays, objects, tables) in a natural way.