[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24252: 25.1; json.el doesn't distinguish null and empty object
From: |
Damien Cassou |
Subject: |
bug#24252: 25.1; json.el doesn't distinguish null and empty object |
Date: |
Wed, 13 Jun 2018 09:13:06 +0200 |
Eli Zaretskii <eliz@gnu.org> writes:
> Nicolas Petton <nicolas@petton.fr> writes:
>> It looks good to me, but I'm wondering if encoding/decoding (not
>> pretty-printing) will be backward-compatible or not.
> From my POV, Nico asked a question that I didn't see answered, so the
> patch is still "being discussed", as far as I'm concerned. If you can
> address Nicolas's concern, we should be able to move ahead.
I understood Nico's message as a call for help from other Emacs
maintainers, not from me :-).
The new code is certainly *not* backward-compatible if you look at the
details. For example, `json-encode-list` was sometimes printing `null`
and it won't do that anymore. I see that as a bug fix because `null` is
not a list but it clearly makes the code not backward compatible.
On the other hand, all existing unit tests still pass and the patch
includes a bunch of new ones. I have been using this patch since I wrote
it with no problem at all.
My opinion is that a new Emacs release based on master is far enough in
the future to merge this patch now and see if any complaints come
:-). At worst, we will find a bug and Emacs will gain a new unit test.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill