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, 24 Aug 2024 17:33:33 +0200 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> <4C93E902-282D-4408-B449-C8E771B2B3E4@gmail.com> <86cyr7agjo.fsf@gnu.org> <850DEC32-F318-4F3E-BA87-55FC6DC74CD3@gmail.com> 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="10305"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , 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 Aug 24 17:35:32 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 1shsnc-0002Z4-E3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 17:35:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shsnL-0002mu-Od; Sat, 24 Aug 2024 11:35:15 -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 1shsnJ-0002mH-Hz for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 11:35:13 -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 1shsnJ-0001eW-8J for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 11:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=TVAojt3IqxFHr/xb6906PD+MZKrdOBiERsNLqMiRDNo=; b=d52McypqkbxVc600mwvJimJZTvvYO5LvSVaBXk7SXU3IbrqtyhhV0FK3V2/rM2Dqeg2/rTNPT8q2iRvWrodYdHGil4vPVSwRiyNcFCN27cBFd7DxCgKlf9T2gxevRgX1oLZxzMDBlAFvkY9cOQI51i+bJLXRMVDmTxtJQa3a6NJQ2JJPAQxcAZFOhmg2DWgqINlR+CMJtRienkHCJpBnJPizbtSmDlsCgsnxkoh8mWjrF+3IW3UYWKzi1jb9bCOdpUFDwBXFQhHGHroEZRzZF3AMDhN0SgIbMdZct9AR2Xi2ve5FNOci80aNBv+2Dg9O1ZgpS4shMyHbZfulLmue/g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shso5-0002iG-Sa for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 11:36: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, 24 Aug 2024 15:36: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.172451373110376 (code B ref 70007); Sat, 24 Aug 2024 15:36:01 +0000 Original-Received: (at 70007) by debbugs.gnu.org; 24 Aug 2024 15:35:31 +0000 Original-Received: from localhost ([127.0.0.1]:41782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shsnb-0002hH-Dt for submit@debbugs.gnu.org; Sat, 24 Aug 2024 11:35:31 -0400 Original-Received: from mail-lf1-f47.google.com ([209.85.167.47]:53511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shsnZ-0002h3-Ec for 70007@debbugs.gnu.org; Sat, 24 Aug 2024 11:35:30 -0400 Original-Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-533462b9428so5068107e87.3 for <70007@debbugs.gnu.org>; Sat, 24 Aug 2024 08:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724513615; x=1725118415; 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=TVAojt3IqxFHr/xb6906PD+MZKrdOBiERsNLqMiRDNo=; b=URFODMPK10DsBW2hJE9du/pPqEnmcZLvMnqMxW7eVjrZnkDAxJkLGC2YbtwIRQ69Kl qTWmffdwfINO0DNxFjGIWdm6n+Qvs2GcX2Zt4MErBH2GiUHNYV8JpPh6xK8YuTR4UmSp 0ghjiWBZW6K10wFmAKn7702J6BvT8Jza2VfA75gUo/WZv1xA0yqK3xKxh3pXWCkonHd6 plvNFY1isRVsz+PJ8SxiGcB/ocjF9OFt9IPSQ/TBkkVMPj5B6nmeuXeF++Po9rshdynn Q3zH10/UUWrY+lKWr6hhmmozLlmt/emp9Qxiswxj2V74YV2KsmXW4UDJJyhLQXfdKJ6a Mf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724513615; x=1725118415; 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=TVAojt3IqxFHr/xb6906PD+MZKrdOBiERsNLqMiRDNo=; b=RbzYqTrmumdLp5Vjr9z+YweguvSJEB9o/Pcrob+u7B/z8xHOU8wJkoV3GdCdLlRiQF KvRkljjg5lmvKG5mpQcZRLKI3XRKBx1+hrrQSYT8oli3awx47VDG0UjfRJX6fMyeWsHP OyEp93qRRKtLEuIfw3IibT+astevyUhQg87wK+H0gavu9GW5nxZRRw2FpBg892iU7XF+ QqifJ/cZLLy/n1KppBvRg/EtZHb+3sCvjVgrhO+60iI3/L53x1qoSs1ISlZq7rY8dqoh CaUjumQKAnXLr2hPOch1K1oTSWEzZXsqaYc4f1LJFG3PM8rAsPZc9MTBPS3B4et5zhEL gl2A== X-Forwarded-Encrypted: i=1; AJvYcCX6ejvbG8wCaJHwNQR40cLrdReoBAY9up+ZmZQNGfVg9kgP2lvTugdWdf0dgWlXUXaydM+3bA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyO73ETTshFvpE6efrsMfVEHhDoUUv9iCvNiyXA4q9rK0ZvWr7y Z7jBy/H3Q3WKzAUo32HN9PBDn7WpBFYyKxLqlzrGp8URxF4OfJ0/ X-Google-Smtp-Source: AGHT+IEqYaJDdBI46UJnK4s60PNBxK353qDxw1PnMCIpxlUcAykEp5WTVYGSfmPY0bLDcV1ylq6uBQ== X-Received: by 2002:a05:6512:3a88:b0:529:b718:8d00 with SMTP id 2adb3069b0e04-5343883d653mr4947045e87.8.1724513614276; Sat, 24 Aug 2024 08:33:34 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-191-82.bredband.tele2.se. [188.150.191.82]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5334ea5d8fcsm881406e87.227.2024.08.24.08.33.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Aug 2024 08:33:33 -0700 (PDT) In-Reply-To: <850DEC32-F318-4F3E-BA87-55FC6DC74CD3@gmail.com> 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:290680 Archived-At: (I'm going through some old unfinished work.) The only major issue remaining here would be whether `json-serialize` = should return a multibyte string, as it does now, or a unibyte string. I = think we agree that unibyte is the correct choice in general, and since = the code is new in Emacs 30 we should make a decision now because = changing it in Emacs 31 will be riskier. On the other hand, the old = libjansson implementation returned a multibyte string. I've looked at packages using the API and they appear entirely agnostic = -- the result is almost always a string that is fed into = `process-send-string`.