From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.help Subject: Re: How to test for native JSON support? Date: Mon, 3 May 2021 03:20:32 +0300 Message-ID: <785b4132-da32-0da8-519d-b39a58270f32@gmail.com> References: <87k0ohuybx.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18997"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 To: Joost Kremers , gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 03 02:21:08 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 1ldMKh-0004qd-Sd for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 02:21:07 +0200 Original-Received: from localhost ([::1]:50980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldMKg-0005RN-V5 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 20:21:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldMKD-0005QT-TS for help-gnu-emacs@gnu.org; Sun, 02 May 2021 20:20:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42962) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldMKD-0004qD-MA for help-gnu-emacs@gnu.org; Sun, 02 May 2021 20:20:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41442) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ldMKD-0001jV-3I for gnu-emacs-help@gnu.org; Sun, 02 May 2021 20:20:37 -0400 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:39910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldMKB-0004mY-MR for gnu-emacs-help@gnu.org; Sun, 02 May 2021 20:20:36 -0400 Original-Received: by mail-lj1-x22f.google.com with SMTP id s9so4821026ljj.6 for ; Sun, 02 May 2021 17:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=KCCZjMRLmcoLJ5VGN5vHRYBV3/P4PQoPE0143uBPKeg=; b=qqkPhmYxptOUsUuKqZbrAUPInBzFFJ35Frj9RwTUwn5VV7aU36LjQPlQ1GUI0syocr Xw6dfVTBJ2TqqDI+d3Kll5yfbnVuOEzR/19ltdy9Vaox6yAfgDIVyGe7uLMIx+9miAVL bd2xNP53Az9WmpKXJngiWOurhN999DMcUIMLrHwEOsz2wo3D+D8XlqffezSTWmqFxtXw NW9WkKh+7yFo3uSun55cLhwW6Ir9FRZu53ZJE/b3GjMe+5OxKnjPUXzSeephMnPcjMzo tPe8UxoLJ65/PhiJnLGmPV6pbm7B6/JnAXhMjnNXznpXnMrA5PJTgSGQPzxPSa4H5vqr BgEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=KCCZjMRLmcoLJ5VGN5vHRYBV3/P4PQoPE0143uBPKeg=; b=eP+eKbIUXYf1ik4hnR2eI+SLXMZWvvrqYlohs3DENJGL3/CFY+GT8KOFFHdhLScuIW dmgFuwuNcw6R+GH9HaN76MzDfG/uxklRXM929wKUqnOrGcDHLj0zujfp7/W1XZ6emNfs jvmSp3tDyk+Wm9TTxTsfANA+zH4f+JrvSaSaPp74ORJs2lOFtnmkrHVqoaG+iui6w1Bv Xb2nSEWJpDIXG+lknMjgwY/xAvSmNm4RwGGWSizdyDc8aelYC7pRu0+oSbyIEClPr3k+ nP3a1H8fp+jPB67qn9SaDBw8aAaaGdSCQo+IHaPZ9Gz/0kvmArRwmSYwU0Xvx/ujP/Xi IVWg== X-Gm-Message-State: AOAM532m+wv7s/RjwmkZI5Ecfe7gLYz0YgnBOUfVnRWkJvJ/CVskH+xX HzyZ7fp27rGDrDwaJlP+0+vKdJK67s3L5A== X-Google-Smtp-Source: ABdhPJwXH0bOkhrsaFLZTKjHqQVxz5+9kTUBgHIWh5iphFP85cxjBfIV86l0+gae1IQSnou3o8/fZQ== X-Received: by 2002:a2e:8144:: with SMTP id t4mr11692273ljg.57.1620001233211; Sun, 02 May 2021 17:20:33 -0700 (PDT) Original-Received: from ?IPv6:2a02:2168:b115:9d00:a204:260f:c458:8d28? ([2a02:2168:b115:9d00:a204:260f:c458:8d28]) by smtp.gmail.com with ESMTPSA id o24sm1047186ljj.69.2021.05.02.17.20.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 May 2021 17:20:32 -0700 (PDT) X-Google-Original-From: Nikolay Kudryavtsev In-Reply-To: <87k0ohuybx.fsf@fastmail.fm> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=nikolay.kudryavtsev@gmail.com; helo=mail-lj1-x22f.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, NICE_REPLY_A=-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-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:129359 Archived-At: In my testing the safest way seems to be checking if (json-serialize ‘((test . 1))) would return a non-nil value.