From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.bugs Subject: bug#42994: 27.1; json-serialize unable to serialize JSON values Date: Sun, 23 Aug 2020 17:46:54 +0100 Message-ID: <4309c1ca-f568-2fb4-cba0-d6e86453a94c@gmail.com> References: 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="8272"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.1.1 To: Drew Adams , 42994@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 23 18:48:12 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 1k9tAB-00023O-Ii for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Aug 2020 18:48:11 +0200 Original-Received: from localhost ([::1]:35492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9tAA-0004dJ-1W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Aug 2020 12:48:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9tA3-0004cv-Ip for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 12:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9tA2-0004l3-BH for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 12:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k9tA2-0007XC-AJ for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 12:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Yuen Ho Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Aug 2020 16:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42994 X-GNU-PR-Package: emacs Original-Received: via spool by 42994-submit@debbugs.gnu.org id=B42994.159820122328832 (code B ref 42994); Sun, 23 Aug 2020 16:48:02 +0000 Original-Received: (at 42994) by debbugs.gnu.org; 23 Aug 2020 16:47:03 +0000 Original-Received: from localhost ([127.0.0.1]:55022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9t95-0007Ux-Cz for submit@debbugs.gnu.org; Sun, 23 Aug 2020 12:47:03 -0400 Original-Received: from mail-wm1-f49.google.com ([209.85.128.49]:54839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9t94-0007UL-E6 for 42994@debbugs.gnu.org; Sun, 23 Aug 2020 12:47:02 -0400 Original-Received: by mail-wm1-f49.google.com with SMTP id 83so6176387wme.4 for <42994@debbugs.gnu.org>; Sun, 23 Aug 2020 09:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=YrGnLl5VZWcJ5trz7dciE+RPY/7CAlCcsVQ1vvu95zA=; b=mQCHfotRaw4JmsC5N0HQfH13/5VAnI141OQkFogbi4/2KQjxFiyC47kuiMiNUvWvUx DTm52j4OMg+8WNiHHKyep+zw+onwg5y/OGE1mSiFJEouwaSyw8EjIJ6NOScWS353T0Xg 6z14lsWKXtHekEWktIaZf7+Hw5VQ2u0bo5XRBo7ln0hgQc2Xn9WQ/d/U25lFjpjFqmwj coI6+aZe+4XGMeWM+FJHRNv1TPfgWQ9OM7OYCqTT9W9GoYTlBMhP+f51oIFY18Cyvz/v DzTQ1J9DURZElIyX4Le5PRzayPGoa8UQ2RNdVqpP4fhTdjcwBZ8oBI0BnTEfL6dLMHHZ ySBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YrGnLl5VZWcJ5trz7dciE+RPY/7CAlCcsVQ1vvu95zA=; b=csSl4nJdO9jYQXRhaHLM2zd5p9mxVp1Ch92PUXrB5SRtGy82C7SNo41XUV5A61r5dp ELyxKB/hsbLqX0e8q10Nn76jNFSEoBJMbx4geForPxHHGrk0yHmle5fxs6K/CvPGcrmT ShL2edeju7CoENCH5eHTV3nRRlXP7Wx/g1PpEujwkv2rc01PVhJeuMdYei1fxcPGvHAD RcfW59eCFilGU3AvRMaxhKPXBzVZa59pAIK2IfiHegBz0j/B9eAK/QoVzY8rWeWJKyiY YZxe8BwMF/pEcIhoKgYLumaafNSIxHto4NHUubHi0kz4SSCzzZNrmz5iejf51U4WVqwF kQwQ== X-Gm-Message-State: AOAM531XPLaA4wGYutWtqsr+sIDpS1ujkMK1giwHLirab0JSbYxUhKRc t3Re1CqdPCDXl/bl2oSxsdA9J8s2E6zodA== X-Google-Smtp-Source: ABdhPJz6SiKZ/64LUlg98l+XYiHPpxl5gLJbLNVshnMFLYpaYajhm5U6SPfeLqfKuYuLM9hExAIfCg== X-Received: by 2002:a1c:dc45:: with SMTP id t66mr2132802wmg.17.1598201216172; Sun, 23 Aug 2020 09:46:56 -0700 (PDT) Original-Received: from MobileCat.local ([188.214.11.130]) by smtp.gmail.com with ESMTPSA id x133sm19369553wmg.39.2020.08.23.09.46.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Aug 2020 09:46:55 -0700 (PDT) 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:186067 Archived-At: > All JSON scalars are JSON values. > > Whether a JSON scalar is sufficient for a document > (a JSON text) to be considered a JSON document > (aka text) depends on whether RFC 8259 is supported. > > https://tools.ietf.org/html/rfc8259 > > When someone speaks of "a JSON", if they mean a > JSON text (aka document), then whether that RFC is > supported determines the status of a scalar value. > > Prior to that RFC, and for applications/systems that > don't support it, only JSON objects and arrays need > be considered JSON texts. > > Put differently, if only RFC 7159 or RFC 4627 is > supported, and not also RFC 8259, then a document > with just a scalar (which is a JSON _value_) isn't > necessarily considered a JSON document. > > From RFC 8259: > > A JSON text is a serialized value. Note that > certain previous specifications of JSON > constrained a JSON text to be an object or an > array. Implementations that generate only > objects or arrays where a JSON text is called > for will be interoperable in the sense that all > implementations will accept these as conforming > JSON texts. RFC 7159, a 6 years old RFC has that exact same language in your quote. That quote means any RFC 4627 JSON text is forward compatible with any JSON parsers conforming to RFC 7159 or RFC 8259 and nothing else. I'm not sure why you are bringing this up. Even RFC 8259 is 3 years old and prior to that people had been sending booleans strings and numbers as JSON text for many years.