From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Philipp <p.stephani2@gmail.com>
Cc: Thomas Hisch <thomas.hisch@ims.co.at>, 46486@debbugs.gnu.org
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 [thread overview]
Message-ID: <877dncywlm.fsf@tcd.ie> (raw)
In-Reply-To: <1255227A-65C5-4FF1-8923-6000545A72D6@gmail.com> (Philipp's message of "Sat, 13 Feb 2021 13:24:23 +0100")
Philipp <p.stephani2@gmail.com> writes:
>> Am 13.02.2021 um 13:04 schrieb Thomas Hisch <thomas.hisch@ims.co.at>:
>>
>>
>> (json-parse-string "\"abc\"")
>> -> progn: could not parse JSON stream: "'[' or '{' expected near '\"abc\"'", "<string>", 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
next prev parent reply other threads:[~2021-02-13 12:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 12:04 bug#46486: 28.0.50; json-parse-string missing support for key-less json strings Thomas Hisch
2021-02-13 12:08 ` bug#46486: (no subject) Thomas Hisch
2021-02-13 12:24 ` bug#46486: 28.0.50; json-parse-string missing support for key-less json strings Philipp
2021-02-13 12:33 ` Philipp
2021-02-13 23:22 ` bug#46486: [External] : " Drew Adams
2021-02-13 12:35 ` Basil L. Contovounesios [this message]
2021-02-13 23:20 ` Drew Adams
2021-02-13 12:30 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dncywlm.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=46486@debbugs.gnu.org \
--cc=p.stephani2@gmail.com \
--cc=thomas.hisch@ims.co.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.