GNU bug report logs - #42994
27.1; json-serialize unable to serialize JSON values

Previous Next

Package: emacs;

Reported by: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Sun, 23 Aug 2020 12:26:02 UTC

Severity: normal

Merged with 46486

Found in versions 27.1, 28.0.50

Done: Philipp <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>, 42994 <at> debbugs.gnu.org
Subject: bug#42994: 27.1; json-serialize unable to serialize JSON values
Date: Sun, 23 Aug 2020 17:46:54 +0100
> 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.





This bug report was last modified 4 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.