From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#46486: 28.0.50; json-parse-string missing support for key-less json strings Date: Sat, 13 Feb 2021 12:35:01 +0000 Message-ID: <877dncywlm.fsf@tcd.ie> References: <86v9aw9nt2.fsf@ims.co.at> <1255227A-65C5-4FF1-8923-6000545A72D6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32470"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Thomas Hisch , 46486@debbugs.gnu.org To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 13:36:09 2021 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 1lAu9h-0008Jj-H5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 13:36:09 +0100 Original-Received: from localhost ([::1]:39138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAu9g-0003YB-Ij for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 07:36:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAu9a-0003Xz-5v for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 07:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAu9Z-0002aL-VP for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 07:36:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAu9Z-0007Rv-Se for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 07:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Feb 2021 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46486 X-GNU-PR-Package: emacs Original-Received: via spool by 46486-submit@debbugs.gnu.org id=B46486.161321971028563 (code B ref 46486); Sat, 13 Feb 2021 12:36:01 +0000 Original-Received: (at 46486) by debbugs.gnu.org; 13 Feb 2021 12:35:10 +0000 Original-Received: from localhost ([127.0.0.1]:33684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAu8j-0007Qb-M5 for submit@debbugs.gnu.org; Sat, 13 Feb 2021 07:35:09 -0500 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:54422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAu8i-0007QN-AR for 46486@debbugs.gnu.org; Sat, 13 Feb 2021 07:35:08 -0500 Original-Received: by mail-wm1-f50.google.com with SMTP id w4so2087471wmi.4 for <46486@debbugs.gnu.org>; Sat, 13 Feb 2021 04:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FPRx3CsLm5FdB9l6Eyg116Ez90JX8ROtC7MivQxcT5g=; b=VAj4ppQi8Yy7hVCovOuF4lCo+p0M7zE55X8/QqKIn4zKWSXCRB9x4dyjoYovJAgcu5 JScuQ81BtK0Lec56SqQ7hzIWkxKZVprkz2SZ2c641Uej4a4aQkA194KadCi2DXZUMHB7 VnDAF3vcvy6cd/AOSfl5QYD8SJl7+3L7xT7AJEteMkmexNf5XJHt7D1VmGskbdtApMGV B4eEE5WKrbbN4RJsykYrhZuWLUlEBEAd2d8zq00JWxDVqNYtyBlzA+lE1gtIoXj1tcWl rEV4wnc12HUaxUJFxLRm6qt8AEoOPiE551P+oo9rNBObXpRqTb1D0AOD6IAjV4Nnipdx q5Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FPRx3CsLm5FdB9l6Eyg116Ez90JX8ROtC7MivQxcT5g=; b=eJnWLtmVuD6NWiW53QZNPL192lW+PHJ1Ulk0xj04hTXKnamAEzJRy5J0XcN0pVariy uWOQpfD+MsuFXvKqZabTTcy/ZefT50Bz5BwI5JCSvPFDFmdAAZaqEoQrF8xBSHHA3TNF oxD6ZzfVWV+e/TZfM1HGC6s8vfe+LpsWK9wWXgp7u2mzYpFCsX48BgNbxgZJnMdImDmG Uoba5x0jXYM+h4k9YZTk4PZ3+sW+IawimjinofYrSR5210GdQuDTRvF6TkGq9SNVFqbi e+291fhbR6paP9+sBuLJJvW+0sG5hYOSCGIqgFy2O/jV2dQXmLAfxhuOSIqzxbkRKvTK SaIA== X-Gm-Message-State: AOAM533ztNb7g0vDGAi8BuCtc+kckcVDcTCDYstcKPR1kGfpnul3KJa5 /Mvg46MnZT98B6IoO8MXjC6UbA== X-Google-Smtp-Source: ABdhPJzLVgd+pq0yu/FtZOUT6lufKURcKbwjQiEYU76TZCuKywCSZSCXRm9JysTRApMvjfTl4u7LCw== X-Received: by 2002:a1c:9d81:: with SMTP id g123mr6665385wme.139.1613219702660; Sat, 13 Feb 2021 04:35:02 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:6d2d:c2fa:f3fa:cabd]) by smtp.gmail.com with ESMTPSA id v12sm498361wrv.69.2021.02.13.04.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Feb 2021 04:35:02 -0800 (PST) In-Reply-To: <1255227A-65C5-4FF1-8923-6000545A72D6@gmail.com> (Philipp's message of "Sat, 13 Feb 2021 13:24:23 +0100") 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:199925 Archived-At: Philipp writes: >> Am 13.02.2021 um 13:04 schrieb Thomas Hisch : >> >> >> (json-parse-string "\"abc\"") >> -> progn: could not parse JSON stream: "'[' or '{' expected near '\"abc\"'", "", 1, 5, 5 >> >> Note that strings that neither start with [ nor { are valid JSON objects >> according to the JSON schema. >> > > That contradicts RFC 4627, which states: "A JSON text is a serialized object or array." RFC 4627 is from 2006 and is obsoleted by RFCs 7158, 7159, and 8259, as well as both versions of ECMA-404, since at least as far back as 2013, all of which lift the strict object/array restriction. The current json.c produces maximally compatible JSON text in that all implementations must accept object/array text, but it would be nice to support scalar values too. Thanks, -- Basil