From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#45032: 26.3; json-pretty-print of JSON with dict containing 't' as a key causes error Date: Sat, 12 Dec 2020 23:25:38 +0200 Message-ID: <56638b63-79a6-a543-4a43-5ee32a30d57e@yandex.ru> References: <877dpxnah5.fsf@gnus.org> <87a6us1b37.fsf@tcd.ie> <87tuszcaxn.fsf@gnus.org> <3329c943-0a5f-811e-bc50-7fe425b05ea7@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8120"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: "Basil L. Contovounesios" , Lars Ingebrigtsen , 45032@debbugs.gnu.org, Henry Minsky To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 12 22:26:47 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 1koCPf-00021s-Pr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Dec 2020 22:26:47 +0100 Original-Received: from localhost ([::1]:55840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koCPe-0001GJ-RV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Dec 2020 16:26:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCOw-0000tN-FA for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 16:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koCOw-0007AQ-7B for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 16:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koCOw-0007S5-3F for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 16:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Dec 2020 21:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45032 X-GNU-PR-Package: emacs Original-Received: via spool by 45032-submit@debbugs.gnu.org id=B45032.160780835228612 (code B ref 45032); Sat, 12 Dec 2020 21:26:02 +0000 Original-Received: (at 45032) by debbugs.gnu.org; 12 Dec 2020 21:25:52 +0000 Original-Received: from localhost ([127.0.0.1]:46952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCOl-0007RP-NK for submit@debbugs.gnu.org; Sat, 12 Dec 2020 16:25:51 -0500 Original-Received: from mail-ed1-f52.google.com ([209.85.208.52]:35516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCOi-0007R8-8T for 45032@debbugs.gnu.org; Sat, 12 Dec 2020 16:25:49 -0500 Original-Received: by mail-ed1-f52.google.com with SMTP id u19so13163855edx.2 for <45032@debbugs.gnu.org>; Sat, 12 Dec 2020 13:25:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s3Z0ekFeUw05vL9Fw6DzYKBNEZFJqPCckG2oLnVQJDw=; b=LQDDGn4qaRM9VvC59M3dc9a47AP8bIyZL6LBZLL+mdrUwJd8TJVOMjOTjCwZnDRMzQ dDtfcMB1BKMmu/tpMgLR8xVZlTXXU7dtbaKYUO4deLGU0PQJs6KopoiaxXxKi4zseRnF U7wS9GKd/liMcJ8YGGxBGC/4XVbuYlZ7ESYlFAZFzm1aSl3IpQt/0qQEYBA4tta2oEQL 4nRE51doq6MbCMRfCx3zcgfJJAQdmAtPj+IncQSLsRp/vO5YYkMK1jTcpxU99KRS2bAM iGRkTqaQziTuCiaBKdINDV1BkWaX0RerkrvJ9NyXDzWbBbjpCB+REcbXKjHgxbNab5+m 2nmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s3Z0ekFeUw05vL9Fw6DzYKBNEZFJqPCckG2oLnVQJDw=; b=FHJYn/S2+MFeCMRBbd6wZ9UbUfulMsNBlUbjILzKPLHvgEK1A0hZN+3PE6xUggFYRA Ck0UmP7r2HjGe2KjMgJWmJKxhOaaiIJ+gEf3/zQusreA55X7VSJ5T9Yno/P2B8NK99xn h6wk5FsVDITR6k/jMZucW8KInetLCvqk6DaUXrM2vom1hj5otzmPl1FF0LELvhte6vP2 jcctStjxPp4H0TajSU30zBa7N1hR4IQLgSpHa4fzWdQZ/WlT+w7lNlzgTyqXPBP9+dTq WlpegrZJoi6BYtvYp7xHwQuzV8eTyWjJkVOv9dUk+xH6JdrDHur0lHQLotdVvvCOgn7Q 9gNQ== X-Gm-Message-State: AOAM530zJC2VLe+QFVFROXdhn3+UBZDSp1d9RhdxJz77IAC1EU3Dn/Uh c2gZzfphG/xexqWfCFadIxw= X-Google-Smtp-Source: ABdhPJwSDJKGByL0n5d4sRULxB+dFFBTEKGbn8re1enSR5kSxr5NjFjIb5Jd3qnLwmFMj8BAEmsQ2A== X-Received: by 2002:aa7:c698:: with SMTP id n24mr17979138edq.277.1607808342318; Sat, 12 Dec 2020 13:25:42 -0800 (PST) Original-Received: from [192.168.0.5] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l5sm11794942edl.48.2020.12.12.13.25.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Dec 2020 13:25:41 -0800 (PST) In-Reply-To: Content-Language: en-US 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:195906 Archived-At: On 12.12.2020 16:28, Philipp Stephani wrote: >> So this difference in keywords serialization was by design? >> >> ELISP> (json-serialize '(:a 1 :b 2)) >> "{\"a\":1,\"b\":2}" >> ELISP> (json-serialize '((:a . 1) (:b . 2))) >> "{\":a\":1,\":b\":2}" > I can't answer that. When I wrote json.c, I had it only support > hashtables, and list support is a later addition. Perhaps we could agree that there _are_ some things that can be fixed in json.c's behavior, then? And use json.el's behavior in those situations as example.