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?

  • magic_lobster_party@fedia.io
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    3 months ago

    I don’t like YAML because it’s overly complicated. The specification is like 80 pages long. How the hell did they think that was a good idea?

    JSON on the other hand is super simple. It doesn’t do more than it needs to.

    Just compare this: https://yaml.org/spec/1.2.2/

    With this: https://www.json.org/json-en.html

    The entire JSON specification is shorter than just the table of contents of the YAML specification!

    Another thing I like about JSON is that you can format it however you want with the whitespace. Want everything on one line? Just write everything on one line!

    If data can be represented as a JSON, then there’s generally only one way to represent it in JSON (apart from whitespace). In YAML the same data can be represented in 1000s of different ways. You pick one.

    • lemmyng@lemmy.ca
      link
      fedilink
      English
      arrow-up
      27
      arrow-down
      1
      ·
      3 months ago

      I will never forgive JSON for not allowing commas after the last element in a list.

      • NostraDavid
        link
        fedilink
        arrow-up
        3
        ·
        3 months ago

        That lack of trailing comma has been the bane of my existence.

    • verstra
      link
      fedilink
      arrow-up
      13
      ·
      3 months ago

      This is the major reason for me. I really liked yaml, because it is way more readable to me than JSON. But then I kept finding new and more confusing yaml features and have realized how over-engineered it is.

      Yaml would be great language if it had its features prunned heavy.