Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1036

Extend bot config files to support comments

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 0.9
    • 0.9
    • libraries
    • None

      We are currently using JSON files to define our bot configurations. JSON is pretty nice to work with, but has a major drawback that makes it unsuitable for config files, it doesn't support comments. To ease the burden of maintaining and running the bots, we really need to be able to put comments in our configuration files to declare intent and provide simple instructions for common admin tasks.

      There are multiple attempts out there at extending JSON to be more human friendly. Among all of those, I think JWCC [1] is the best fit for our needs. It adds C++ style comments (// and /**/) as well as trailing comma in arrays and objects. After comments, the trailing comma is my second most wanted feature in the config files.

      Our config files are only written and consumed for Skara, so we really could go with any format, but even so, I think trying to pick something that at least someone else is using seems like a reasonable idea. Implementing support for these features i our own parser seems pretty easy.

      [1] https://nigeltao.github.io/blog/2021/json-with-commas-comments.html

            ehelin Erik Helin
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: