.yaml, .toml, etc?

  • AeroLemming@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    2 years ago

    Of course it does!

    {
      comment: "This data is super important and it runs the system or something",
      data: ["Some", "stuff", "here"]
    }
    
      • AeroLemming@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Please don’t actually do this. Comment stuff in the code and documentation, not the JSON.

        • sfera@beehaw.org
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Don’t worry, I wouldn’t do things like this in JSON. Nevertheless, it can be very useful to have comments along with configuration values, for example to explain the actual values (not their purpose) and why they were chosen. That’s information you can’t add to the code which processes the values.