From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#70007: [PATCH] native JSON encoder Date: Sat, 30 Mar 2024 15:22:34 +0100 Message-ID: References: <1BF559D1-DB9F-4FEB-90ED-72E0EFD76424@gmail.com> <86wmpphrg7.fsf@gnu.org> <4589243D-C11A-45C1-AF3E-6F4A5BADEB54@gmail.com> <864jcrindg.fsf@gnu.org> <291DD5F1-85B8-4647-A40A-EBBD4C51E253@gmail.com> <8634sbijfx.fsf@gnu.org> <2CF47DA5-A65B-47C4-A28A-6FEE1469BD13@gmail.com> <86cyrdfuai.fsf@gnu.org> <3139C8FE-5C67-4FE3-B940-F449DA73E76C@gmail.com> <86le5zdfbi.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3936"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 70007@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 15:23:24 2024 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 1rqZcC-0000oC-IQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 15:23:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqZbq-0006lw-6o; Sat, 30 Mar 2024 10:23:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqZbo-0006kU-LM for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 10:23:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqZbo-0002sq-DF for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 10:23:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqZbp-00037S-Tn for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 10:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70007-submit@debbugs.gnu.org id=B70007.171180856911970 (code B ref 70007); Sat, 30 Mar 2024 14:23:01 +0000 Original-Received: (at 70007) by debbugs.gnu.org; 30 Mar 2024 14:22:49 +0000 Original-Received: from localhost ([127.0.0.1]:45936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqZbc-00036p-7e for submit@debbugs.gnu.org; Sat, 30 Mar 2024 10:22:49 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:47416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqZbZ-00036D-4a for 70007@debbugs.gnu.org; Sat, 30 Mar 2024 10:22:46 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-513da1c1f26so3240599e87.3 for <70007@debbugs.gnu.org>; Sat, 30 Mar 2024 07:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711808556; x=1712413356; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=Sg55lROk4ZoqZgqWtEkgdYtr3pbcsZw2+SEUmuuK93k=; b=Utrv2NI0PO5iWMWnPJaMxyTu57sjbxYSBUacW1Wc/PEX7Lxw4BUg/oCmJN7YjMCvHp 658kR401xM+UdA1DcO+/DcbSZnJZrWj2mqZWGXiFtv8Ooo0tGTFvdV+Uj0OKsQkpTs0r fFmvPT1Bey4i94dL+oDZV6450leMCRAdpRKmhYJMHNSVIGv7cFzn+y8dhTnGFN6IZcw+ HBXnOykWM20QHibNx4BxAL1CeUPq3g6t6hkjnRAV5OFzQUJK6g73iqB5Q8aqAAkZ6Yyc R67hPhzASimKsqvui8KNXkU0pmu5R9K3f3dRLDzfbXo8ImtrKf15sJVeSJMv7lw5D8cW FDJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711808556; x=1712413356; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Sg55lROk4ZoqZgqWtEkgdYtr3pbcsZw2+SEUmuuK93k=; b=GOTxYUC6Kepyke0my9EddZSq2d5BJUrkBh/vRcRm/uCAqIqOSFQumu5AC2XQyfJdQn 46tctaZcOYPl18jrMlsKqibZpbA+Yvi4DbnguiZei+v9iEE4GKV1Am7gwIyFeptWXMTY QfYZ/vl6m7c/4Es1RzvQlpVUyNYAC4/FjHUo1lWrKOU1Nc2gKaATD8NWIpdlBDJPY594 I0eJY2t1J7yMlc4fuJgzRFRsg4Tw4Jsz3M8ENLxMQbLp+hii2GfL+uPWm/FsLs7cxrVz NNjuLgGW15zb+CptUI0ZwsFNbTdnd3TfAxHBTW4T9zZRS7DX/AQ3GuwlNQZDrUWMd3PA CtXw== X-Forwarded-Encrypted: i=1; AJvYcCWw0mtyZVLhYGn2Y+ujQdh/THAmkMjlAUdvupxSuEqLjSAC+qNc4UoGGur5G/ZKwLzACIkks8ObQw0B8FI0HzIi9OJJpzs= X-Gm-Message-State: AOJu0YwIwoDKPI7qKX366kxO1FsTokmWO7lubUTtaXXconPOBvcR7c3v Dh1Kt4UjwXJje462W2wnKDZtUVaPb6XbhQj3V4tMIP+s3Eg9fWJ6 X-Google-Smtp-Source: AGHT+IGqaq61OrP6i6sc/u0798tFmfaLPiw6VLFI0QCXHTLacCGlB2Z1CpXVWqaEvC4PXM83C2Yy+Q== X-Received: by 2002:a05:6512:31c7:b0:513:cc91:9ed7 with SMTP id j7-20020a05651231c700b00513cc919ed7mr140370lfe.11.1711808555934; Sat, 30 Mar 2024 07:22:35 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 16-20020ac25f50000000b0051596fe5619sm920293lfz.40.2024.03.30.07.22.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2024 07:22:35 -0700 (PDT) In-Reply-To: <86le5zdfbi.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282372 Archived-At: 30 mars 2024 kl. 14.22 skrev Eli Zaretskii : > This should be a call to memory_full, no? Or if we must signal this > error here, at least make the error message more specific: mention > JSON or somesuch. It's academic, but memory_full is fine. > I'd prefer a more specific error message here, like >=20 > JSON does not allow Inf or NaN Sure. > Last, but not least: should we have a json-available-p function that > always returns non-nil, for better backward-compatibility? Otherwise, > code out there might decide to use json.elm which is not what we want. Yes, keep json-available-p (that always returns t) for compatibility. We = could declare it obsolete but it's not very important. I made the changes above and installed it on master, as well as a = sweeping removal of all things Jansson.