• sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Yup, YAML is a terrible data format, but for a configuration format that you completely control, it works well. Your parser only needs to be good enough to read the configs you create.

    Likewise, JSON is a pretty bad config format due to strictness in the syntax (no optional commas, excessive quotes, etc), but it’s pretty good data format because it’s pretty easy to parse.

    TOML is like YAML, but it has fewer corner cases so it’s pretty easy to learn completely.

    Though anything is superior when it’s already the status quo on a project.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I don’t know dude, with YAML treating the word no as a Boolean and having like 6 types of multi line strings I’m really inclined to disagree with the “fewer corner cases” part. It’s like waaaaaaaay less corner cases. Imagine pasting the ISO abbreviation for a country as a Boolean value.