I feel that Yaml sucks. I understand the need for such markup language but I think it sucks. Somehow it’s clunky to use. Can you explain why?

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    3 months ago

    Yes, they could’ve just used JSON. Totally pointless waste of time.

    • borup
      link
      fedilink
      English
      arrow-up
      13
      ·
      3 months ago

      JSON does lack comments. And numbers that are not 64 floats.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        3 months ago

        TFB, the numbers are not defined as 64 bits floats.

        They are just not defined. At all.

          • marcos@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            3 months ago

            That’s a valid point.

            There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API.

            JSON is neither, but it’s closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON.

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        3 months ago

        There’s a lot of JSON parsers that don’t mind to see comments there, just ignore them. And there’s also the “_comment” / “$comment” thing.

    • xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      3 months ago

      So Poe’s Law and all that… I really hope you’re being sarcastic because having non-technical people hand edit JSON is a nightmare. It’s also quite annoying to read without a lot of extra whitespace which most editors that’d help less technical folks omit… and comments to help highlight what different things mean are hacky, hard to read, and actually read as data.

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        No, I’m kind of serious, the comment situation is already solved in JSON… about the rest yeah, Yaml might be easier but the different isn’t that much. Non tech people can’t edit Yaml properly either so.