[Kea-users] [Kea 1.2] configuration - cannot end the last element of a list with a comma

Francis Dupont fdupont at isc.org
Tue May 9 09:12:03 UTC 2017


"Chaigneau, Nicolas" writes:
> I understand that the JSON standard does not allow for trailing commas.
> 
> There are other things it doesn't allow: comments. But I think we can agree=
>  they are very convenient :)
> 
> Trailing commas are convenient. I think they should be allowed, if there ar=
> e no drawbacks in doing so.

=> there is a big difference between comments and trailing commas:
comments are lexical objects which can be remove easily by a small piece
of code (in fact we have this code somewhere because it was needed during
the parser transition). Trailing commas belong to syntax so are not
easy to remove without parsing the JSON input and for sure will break
all JSON tools you can use. So there is a clear drawback to accept them.
BTW there is a third case: includes. They are too lexical objects (even
I don't recommend this you can open or close a partial list or map using
an include) so do not touch the syntax.

Thanks

Francis Dupont <fdupont at isc.org>

PS: the main inconvenient from the strict no trailing comma rule is
when you put some part into a comment, in particular when generating
the config...



More information about the Kea-users mailing list