From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Henry Minsky Newsgroups: gmane.emacs.bugs Subject: bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error Date: Thu, 3 Dec 2020 16:19:25 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c3046605b595ea0a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32532"; mail-complaints-to="usenet@ciao.gmane.io" To: 45032@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 03 22:41:52 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkwMJ-0008L8-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 22:41:51 +0100 Original-Received: from localhost ([::1]:59820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkwMI-0007Sk-9X for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 16:41:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkwKY-0004zY-Ih for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 16:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkwKY-0000Mh-Af for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 16:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkwKY-0007WU-6d for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 16:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Henry Minsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Dec 2020 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45032 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160703157228865 (code B ref -1); Thu, 03 Dec 2020 21:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Dec 2020 21:39:32 +0000 Original-Received: from localhost ([127.0.0.1]:41973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkwK3-0007VU-Ex for submit@debbugs.gnu.org; Thu, 03 Dec 2020 16:39:31 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkw0s-0006zH-24 for submit@debbugs.gnu.org; Thu, 03 Dec 2020 16:19:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkw0r-0001ha-Mm for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 16:19:41 -0500 Original-Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:39985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkw0p-0001Tl-D5 for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 16:19:41 -0500 Original-Received: by mail-ot1-x332.google.com with SMTP id j12so3181845ota.7 for ; Thu, 03 Dec 2020 13:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HyHKp/ta8vjEbuZVi2rav+9P6Eajjd33JpPhJG1xqy8=; b=AzcQ6/pdwcF6WLzTj4lr24Nz/4xx6dcJhVMLCwyhNYi1bxlk57bEu7Fzm8Gz6aZuGX xTGVmYsafEdBomxpBbEG8JQa7K0CX3H83VzM1jH4zTn3ZTpJE+JcOw5vLuYrE1tTpbWL I+ci1YiCYpA/EMEFCsaGsPrVu5zhTtkbW+sIawzAfHLq78Yl6TH9RxFJ901D5IwsL+GD 5F7697d41NfXrXhWkk1CmawhICwlNkBcl18oo8VENSKvnPjAjV/b17217qkXBhuIAzBw yYTjROsm1YgX0zcPVbU/K3JBVguPi87yqqsMjQ3DlameY09FamjWy9mzu46wKn299WI+ aptg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HyHKp/ta8vjEbuZVi2rav+9P6Eajjd33JpPhJG1xqy8=; b=BSw4sheiDf1U8zNDrH0V9P00i1mwEq2CWHPTmOTp1woADtnIp35mkpG2x4suEP44rr 7t0K5gQRSUW5eq3uHHz8vYBP3JmBCRA5XQK170DgW7VeTBrLdGXhbS1P9VXtdXjK5lf4 7vTjZ11/EGR8mtDxlceIBDwvyl3IRLk9eW/47G/s0MywT1k24utLWrzQDr7AXdWUItQ4 JPBjkJNs0e9htfdbfKuQ/5MlZJQ1zXRFIBPLUZwCyPPxMsMrLczxH1a7hP6n7zDTOyNw fEcnQhl2pMloHK9dAJloMR+1e8SfSiupaRagYCPvpd57mDmKMH4BEeYfbtvueQFrWOjf hFPQ== X-Gm-Message-State: AOAM530vCyTN1i2ZL77AoIhRzqLnNmDql46Jgrwk/4VvtS8sQrMQTmBY fsSex/Xbe4lyrTrkjcDfUfoDgmQo+0yRtVg9Zi1i3YVIwZikXw== X-Google-Smtp-Source: ABdhPJycAQLG2F2BCjh4bpCLaKWksCX00p6+FC/w0uQPoNeQOmhIaZOeJHpQGO/wyZkn2FNvTosQ5o03pl0qnODuyog= X-Received: by 2002:a9d:4d17:: with SMTP id n23mr971586otf.43.1607030376955; Thu, 03 Dec 2020 13:19:36 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=henry.minsky@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 03 Dec 2020 16:39:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194927 Archived-At: --000000000000c3046605b595ea0a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2022 Recent messages: Loading vc-svn...done Loading autorevert...done For information about GNU Emacs and the GNU system, type C-h C-a. Quit ls does not support --dired; see =E2=80=98dired-use-ls-dired=E2=80=99 for m= ore details. Quit command-execute: The mark is not set now, so there is no region Mark set json-encode-key: Bad JSON object key: t Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: JavaScript Minor modes in effect: override-global-mode: t global-auto-revert-mode: t display-time-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr warnings emacsbug message rmc puny rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils js advice sgml-mode dom json map imenu thingatpt dired dired-loaddefs elec-pair cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf info package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv edmacro kmacro format-spec server autorevert filenotify cus-start cus-load vc-svn bdc-indent cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib time time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 459220 15608) (symbols 48 31276 1) (miscs 40 62 287) (strings 32 108877 1948) (string-bytes 1 2792952) (vectors 16 49371) (vector-slots 8 918195 17836) (floats 8 64 200) (intervals 56 375 1) (buffers 992 14)) --000000000000c3046605b595ea0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



If you run M-x json-pretty-= print on this buffer contents:

{"t": 259}

You get a= n error
Bad JSON object key: t

It seems like the json parser is c= onverting the string "t" into the
symbol t which is being trea= ted specially?





In GNU Emacs 26.3 (build 1, x86_64-ap= ple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
=C2= =A0of 2019-09-02 built on buil= der10-14.porkrind.org
Windowing system distributor 'Apple', = version 10.3.2022
Recent messages:
Loading vc-svn...done
Loading a= utorevert...done
For information about GNU Emacs and the GNU system, typ= e C-h C-a.
Quit
ls does not support --dired; see =E2=80=98dired-use-l= s-dired=E2=80=99 for more details.
Quit
command-execute: The mark is = not set now, so there is no region
Mark set
json-encode-key: Bad JSON= object key: t

Configured using:
=C2=A0'configure --with-ns &= #39;--enable-locallisppath=3D/Library/Application
=C2=A0Support/Emacs/${= version}/site-lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp= 9; --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIB= XML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:=
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-= 8-unix

Major mode: JavaScript

Minor modes in effect:
=C2= =A0 override-global-mode: t
=C2=A0 global-auto-revert-mode: t
=C2=A0 = display-time-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode:= t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-= bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-m= ode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0= auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-= compression-mode: t
=C2=A0 column-number-mode: t
=C2=A0 line-number-m= ode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None f= ound.

Features:
(shadow sort mail-extr warnings emacsbug message = rmc puny rfc822 mml
mml-sec epa derived epg gnus-util rmail rmail-loadde= fs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils= mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-= utils js
advice sgml-mode dom json map imenu thingatpt dired dired-loadd= efs
elec-pair cl-extra help-mode use-package use-package-ensure
use-p= ackage-delight use-package-diminish use-package-bind-key bind-key
easy-m= mode use-package-core finder-inf info package epg-config
url-handlers ur= l-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs passw= ord-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv edmacro k= macro format-spec server autorevert
filenotify cus-start cus-load vc-svn= bdc-indent cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-style= s cc-align cc-engine cc-vars
cc-defs cl-loaddefs cl-lib time time-date t= ooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwhee= l term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dn= d fontset image
regexp-opt fringe tabulated-list replace newcomment text= -mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow = isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu= font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang mis= c-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp5= 1932
hebrew greek romanian slovak czech european ethiopic indian cyrilli= c
chinese composite charscript charprop case-table epa-hook jka-cmpr-hoo= k
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefsbutton faces cus-face macroexp files text-properties overlay sha1 md5
b= ase64 format env code-pages mule custom widget hashtable-print-readable
= backquote threads kqueue cocoa ns multi-tty make-network-process emacs)
=
Memory information:
((conses 16 459220 15608)
=C2=A0(symbols 48 3= 1276 1)
=C2=A0(miscs 40 62 287)
=C2=A0(strings 32 108877 1948)
=C2= =A0(string-bytes 1 2792952)
=C2=A0(vectors 16 49371)
=C2=A0(vector-sl= ots 8 918195 17836)
=C2=A0(floats 8 64 200)
=C2=A0(intervals 56 375 1= )
=C2=A0(buffers 992 14))
--000000000000c3046605b595ea0a--