Hello Dmitry, thanks for the feedback.
On Tue, Nov 3, 2015 at 3:00 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
I have to say, I'm still not very comfortable with mixing it sort of alien logic inside json-read-object and json-read-array (would anyone else like to chime in with their opinion?).
Here's an idea: both json-read-object-1 and json-read-array-2 will advise json-read to add the new logic around calls to it (there will have to be some guard in the advice, so that recursive calls are run unmodified).
[...] advice should be reserved for the cases where you cannot modifya function’s behavior in any other way. [...] In particular, Emacs’sown source files should not put advice on functions in Emacs. (Thereare currently a few exceptions to this convention, but we aim tocorrect them.)