emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Accept alists when serializing JSON


From: Philipp Stephani
Subject: Re: [PATCH] Accept alists when serializing JSON
Date: Tue, 26 Dec 2017 20:46:30 +0000



Vibhav Pant <address@hidden> schrieb am So., 24. Dez. 2017 um 18:16 Uhr:
My motivation behind plist support was to achieve feature parity with json.el, 
so that `json-serialize` could be used as a drop in replacement in the future.

I don't think that should be a goal. Interfaces should be kept minimal and simple. The json.el interface already does "too much", even allowing to generate invalid JSON (e.g. by setting json-encoding-separator to something meaningless). We should only implement features if there's a clear, demonstratable benefit, not just because some other library has them.
Libraries parsing or generating JSON do so to conform to some API and need to process the respective Lisp objects anyway to adapt them to whatever they want to do with the data. It's OK to make them use :false etc. explicitly without possibility of customization.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]