[IntelMQ-dev] config format (Is: IEP01: IntelMQ Configuration Handling)

Bernhard Reiter bernhard at intevation.de
Mon Dec 14 10:42:05 CET 2020


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

-- 
www.intevation.de/~bernhard   +49 541 33 508 3-3
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.cert.at/pipermail/intelmq-dev/attachments/20201214/e5f9bb28/attachment.sig>


More information about the IntelMQ-dev mailing list