Hi Birger,
Am Donnerstag 10 Dezember 2020 13:17:45 schrieb Birger Schacht:
# IntelMQ Configuration Handling (IntelMQ Enhancement Proposal 01) ## Format
The downside of JSON is, that is is hard to read and and write for humans and it cannot contain comments.
JSON can contain comments, if they are part of the data itself, e.g. { "parameter1": true, "parameter1-comment": "better to have this enabled ;)" } or [ { "comment":"this really should be considered 2020-12-14ber", "param1":false }, { "param2":"Bernhard", "comment:"my name in 2020" } ]
this is a good thing, if data is to be handled mainly by tools and frontends. Because otherwise the comments are not accessible or visible there.
It is a drawback for workflows where text files are mainly worked upon manually, saved, delopyed and diffed with SCM like tools or text editors.
So the question behind this is the weight of the different use cases. Personally I'll find the wireing of a graph easier in an editor and IntelMQ Manager will certainly used by a number of people for this. So JSON is a good, modern fit for IntelMQ. I also consider it okay to write with a text editor.
_If_ there is a different format to be chosen because of the sum of the weight of the text file and out of band comments use cases, I advise against YAML. YAML is too complicated, which makes it hard to write and parse correctly by tool and humans. (The Python proposal lists the problems with the format.) Of all presented options (YAML,INI,TOML) I'd go with TOML.
Best Regards, Bernhard