"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 <[email protected]> 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... _______________________________________________ Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
