bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70007: [PATCH] native JSON encoder


From: Eli Zaretskii
Subject: bug#70007: [PATCH] native JSON encoder
Date: Tue, 26 Mar 2024 18:46:00 +0200

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Tue, 26 Mar 2024 16:33:52 +0100
> 
> If we replace the lisp-to-JSON encoder with native code, we would not need 
> the jansson library for it and it would be faster.
> 
> There is ongoing work on a JSON-to-lisp parser, but the author has made it 
> clear that he does not have time to write an encoder, so I spent a morning 
> mashing up the attached patch.

Thanks for working on this.

> It generally produces the same result as the old code, except:
> 
> - The old code incorrectly accepted strings with non-Unicode characters (raw 
> bytes). There is no reason to do this; JSON is UTF-8 only.

Would it complicate the code not to reject raw bytes?  I'd like to
avoid incompatibilities if it's practical.  Also, Emacs traditionally
doesn't reject raw bytes, leaving that to the application or the user.

> I'd be very happy if someone could test it with packages that use this 
> interface (json-serialise, json-insert).

Yes, please.





reply via email to

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