• vrighter@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    14
    ·
    11 months ago

    I hate yaml with a passion. for stuff such as ansible it becomes an uneditable mess (one copy and paste away from destroying the whole file)

    luckily, yaml is a superset of json, so you could just write json and feed it through a yaml parser and it’ll work

    • bob_wiley@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      11 months ago

      How is yaml any harder than json? You can just a easily miss a comma, quote, or some other bit of syntax with json, as you can screw up indenting with yaml.

      • vrighter@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        if i miss a quote in json, it’s an invalid file. I fix it and move on. Maybe just pass it through a beautifier or something.

        if I mess up indentation in yaml (which can easily happen after a copy and paste), I get a valid file that means something completely different. And no beautifier can help with that, because it’s a valid file. I have to look really closely to find the error, because tools can’t help. And when I do, I usually have to change multiple lines, instead of just adding a comma.