From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Mattias Engdegård" <mattias.engdegard@gmail.com>, 70007@debbugs.gnu.org
Subject: bug#70007: [PATCH] native JSON encoder
Date: Thu, 28 Mar 2024 20:16:35 +0100 [thread overview]
Message-ID: <87y1a29nfw.fsf@thornhill.no> (raw)
In-Reply-To: <86wmpphrg7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 Mar 2024 18:46:00 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
I've been using this along with the json-to-lisp parser for some time
now, and I'm really happy to see these improvements. Thanks a lot!
I haven't seen any issues thus far, and emacs is much more responsive.
I hope both of these patches will soon arrive on emacs 30.
I'll continue using and testing both until then.
Thanks,
Theo
prev parent reply other threads:[~2024-03-28 19:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 15:33 bug#70007: [PATCH] native JSON encoder Mattias Engdegård
2024-03-26 16:46 ` Eli Zaretskii
2024-03-27 12:46 ` Mattias Engdegård
2024-03-27 15:49 ` Mattias Engdegård
2024-03-27 17:40 ` Eli Zaretskii
2024-03-27 18:57 ` Mattias Engdegård
2024-03-27 19:05 ` Eli Zaretskii
2024-03-28 20:59 ` Mattias Engdegård
2024-03-29 6:04 ` Eli Zaretskii
2024-03-30 11:41 ` Mattias Engdegård
2024-03-30 13:22 ` Eli Zaretskii
2024-03-30 14:22 ` Mattias Engdegård
2024-03-30 16:14 ` Richard Copley
2024-03-30 16:40 ` Eli Zaretskii
2024-03-30 23:29 ` Richard Copley
2024-03-30 16:45 ` Andy Moreton
2024-03-30 20:36 ` Corwin Brust
2024-03-30 16:37 ` Eli Zaretskii
2024-03-30 20:21 ` Mattias Engdegård
2024-04-02 14:13 ` Mattias Engdegård
2024-04-02 16:13 ` Eli Zaretskii
2024-04-02 17:19 ` Mattias Engdegård
2024-03-28 19:16 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1a29nfw.fsf@thornhill.no \
--to=bug-gnu-emacs@gnu.org \
--cc=70007@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.