From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: How to test for native JSON support? Date: Tue, 04 May 2021 15:06:10 +0200 Message-ID: <87czu6myke.fsf@fastmail.fm> References: <87k0ohuybx.fsf@fastmail.fm> <785b4132-da32-0da8-519d-b39a58270f32@gmail.com> <87y2cuybeu.fsf@passepartout.tim-landscheidt.de> <838s4u66f0.fsf@gnu.org> <87fsz2n075.fsf@fastmail.fm> <834kfi64ts.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.12; emacs 27.2 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 15:14:28 2021 Return-path: Envelope-to: geh-help-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 1ldusd-0008iA-NO for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 15:14:27 +0200 Original-Received: from localhost ([::1]:58140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldusc-0002VS-Qa for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 09:14:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldury-0002Uw-U9 for help-gnu-emacs@gnu.org; Tue, 04 May 2021 09:13:46 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:36275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lduru-00083A-Oe; Tue, 04 May 2021 09:13:46 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C7DA15C0198; Tue, 4 May 2021 09:13:41 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 04 May 2021 09:13:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type; s=fm3; bh=ztJ+yUE9iz5wBp4jUxGEgb0uAM KgME+kGHCUW3YZUFg=; b=auuMhGbtWYmnZbuKW6TgmeGHutJS0a+KxED0bM9LAG r39jRqDKKYko3/SzmA2cgXOWwDqzAJ8faJftrcHZmc9uKoJ9vTodNkML3ssXVLpr 1zZHEeMyhFF7OOoFKCjSZeYOdS0S/uJsAMgFjJqUrB+OKVp+nJ/4Xk8q3MZMI2Rh uR8XaOywKlyIoDKYj6cm8CvXb8neLowu5eh7AxWvF9rvYGvpi4kudoffy37Z0zJ4 gXXdaWACfBEYFf0w42Ro+i2CRHqDgd/XhbFCXiV1HSD3fphR4meV1Gpzq0CLz7hH j/903nMIK8yOvZI/PR55u2L+G58dbhL0oPRACyxNRPCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ztJ+yU E9iz5wBp4jUxGEgb0uAMKgME+kGHCUW3YZUFg=; b=SARTcSI/g/SSUKfwKcb6Jt AJOzYBXaSMMPzPpbupaXdw6LhaEBDnSD7OsWITD8sBgGncbrwFlaU3K/Bp0zvHwu eZ+cIP3QEQDKlW7dz5g0BvIyeKTCyrR/PVUoHd/PAfpxeG4K+rcdy8wxf0CLqDTU Ce5cXumQn2n9oJaIRiz3buVM8hMjHF6p0BaeWggosNP9TdgJG4g3eGTLsHIAHmQG VkKxgD3x5LP7avtWARlgYdgW0grLFf+52IL7DJ7xRZnRjsUDGrZcVLzxcvBwnQRh iMGi+61YssNV2EpnkgMqAkoMstkJ/9F9F6ZJIRmZmnf+fkH4NcVqh5Rm6DewT54Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefiedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpeflohhoshht ucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhmqe enucggtffrrghtthgvrhhnpedviefhteeuveekudetheduieehvdelgfeijeehvdetfeeg leelhefhjeduieejveenucfkphepfedurddujedrvdehuddrudelleenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from Lenovo.fastmail.com (ip1f11fbc7.dynamic.kabel-deutschland.de [31.17.251.199]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 May 2021 09:13:40 -0400 (EDT) In-reply-to: <834kfi64ts.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.26; envelope-from=joostkremers@fastmail.fm; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129426 Archived-At: On Tue, May 04 2021, Eli Zaretskii wrote: > The message is "jansson library not found". > > But to answer your question, you should allow the user to determine > whether the built-in or the Lisp implementation will be used, because > only the user knows whether the library is installed. I'm not sure every user will. I suspect many won't care either way, as long as the relevant json file can be read. >> And is there a reason why the native json-functions do not gracefully degrade >> to >> their counterparts in the `json.el` library? > > First, because no one wrote the code to do that; patches welcome. > Second, because the implementations are not 100% equivalent, neither > in the API names nor in some aspects of the functionality. So > automatic replacement is not trivial, not in general anyway. Ok, I see. I haven't run into any functionality differences yet, but if and when I do, I'll deal with them then. Then who knows, some day I might be able to write that patch... Thanks for your answer! -- Joost Kremers Life has its moments