From: Philipp Stephani <p.stephani2@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
Henry Minsky <henry.minsky@gmail.com>,
45032@debbugs.gnu.org
Subject: bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error
Date: Sun, 6 Dec 2020 18:16:59 +0100 [thread overview]
Message-ID: <CAArVCkTW2MDCZxuB8-OT2BCqxxGqeZGB+OHgDyqW4NbYeNOn+Q@mail.gmail.com> (raw)
In-Reply-To: <87v9desw2c.fsf@gnus.org>
Am So., 6. Dez. 2020 um 18:06 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
>
> Philipp Stephani <p.stephani2@gmail.com> writes:
>
> >> >> I think it's important that native and Elisp JSON serialisation are as
> >> >> consistent as possible here;
> >> >
> >> > I don't think that's realistic: any change in behavior to either of
> >> > these functions would be a breaking change.
> >>
> >> I think we should have JSON/Elisp round trips that are 100%
> >> reproducible. The current functions certainly aren't.
> >
> > I don't understand why that is so important. I designed the C JSON
> > functions partially because I disagree with some aspects of API design
> > and behavior of the Elisp functions, so they are pretty much
> > incompatible on purpose. Trying to make them compatible would make the
> > C functions worse.
>
> Sorry, I was unclear -- I'm not saying the old and the new functions
> should be compatible, only that there should be functions that can round
> trip via JSON->Elisp->JSON and get identical results back.
>
> Is that the case today?
You mean something like (json-serialize (json-parse-string ...))? I'd
hope that's indeed the case to the furthest extent possible. There are
cases where roundtripping is impossible (parsing ignores whitespace,
field order, and duplicate keys), but otherwise I'd hope these
functions are inverses of each other. Or is there a case where they
aren't?
next prev parent reply other threads:[~2020-12-06 17:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 21:19 bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error Henry Minsky
2020-12-04 10:15 ` Lars Ingebrigtsen
2020-12-05 16:17 ` Basil L. Contovounesios
2020-12-05 19:35 ` Philipp Stephani
2020-12-05 22:13 ` Basil L. Contovounesios
2020-12-06 13:37 ` Lars Ingebrigtsen
2020-12-06 17:02 ` Philipp Stephani
2020-12-06 17:06 ` Lars Ingebrigtsen
2020-12-06 17:16 ` Philipp Stephani [this message]
2020-12-07 13:39 ` Lars Ingebrigtsen
[not found] ` <CAJo0r8gbrVk2wZatYS6_G7+7+tF_7VHO9KffrEMWanOK5BjuUg@mail.gmail.com>
2020-12-08 13:26 ` Lars Ingebrigtsen
2020-12-06 19:26 ` Dmitry Gutov
2020-12-12 14:28 ` Philipp Stephani
2020-12-12 21:25 ` Dmitry Gutov
2020-12-13 13:19 ` Philipp Stephani
2020-12-13 18:58 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAArVCkTW2MDCZxuB8-OT2BCqxxGqeZGB+OHgDyqW4NbYeNOn+Q@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=45032@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=henry.minsky@gmail.com \
--cc=larsi@gnus.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).