|
From: | Lars Ingebrigtsen |
Subject: | bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error |
Date: | Fri, 04 Dec 2020 11:15:18 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Henry Minsky <henry.minsky@gmail.com> writes: > If you run M-x json-pretty-print on this buffer contents: > > {"t": 259} > > You get an error > Bad JSON object key: t > > It seems like the json parser is converting the string "t" into the > symbol t which is being treated specially? It's unfortunate that `json-read' is being ambiguous here. true => t {"t": 259} => ((t . 259)) So I don't know how to fix this. We could add another kludge -- saying that a boolean used as an object key "obviously" should be a string instead (when converting back to JSON)? Opinions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] | Current Thread | [Next in Thread] |