GNU bug report logs - #45032
26.3; json-pretty-print of JSON with dict containing 't' as a key causes error

Previous Next

Package: emacs;

Reported by: Henry Minsky <henry.minsky <at> gmail.com>

Date: Thu, 3 Dec 2020 21:40:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 42545, 46174, 46811

Found in versions 24.5, 26.3, 27.1, 28.0.50

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, Henry Minsky <henry.minsky <at> gmail.com>, 45032 <at> debbugs.gnu.org
Subject: bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error
Date: Mon, 07 Dec 2020 14:39:45 +0100
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

>> 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?

No, the confusion is on my part -- I somehow assumed that
json-pretty-print had been converted to use the new C functions, but
it's using the old, non-consistent json.el functions instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.