[erlang-questions] No JSON/MAPS interoperability in 17.0?

Richard A. O'Keefe <>
Thu Mar 13 22:52:44 CET 2014


On 14/03/2014, at 9:31 AM, Carsten Bormann wrote:

> On 12 Mar 2014, at 00:31, Richard A. O'Keefe <> wrote:
> 
>> RFC 7159 is ambiguous on a number of key points, and
>> existing parsers differ on those points.  To give just
>> one example, if you are given
>> 	{"foo": 1, "foo": 2}
>> should this be (a) an error, (b) equivalent to {"foo": 1},
>> (c) equivalent to {"foo": 2}, or (d) something else?
> 
> The example you cite is using JSON’s syntax, but not compatible with JSON’s data model.

ECMA 404 doesn't *HAVE* a data model.
> 
> RFC 7159 is not ambiguous at all here (even if the spec language is slightly broken):

Sorry, I *meant* to write "RFC 4627".
In fact the issue that caused me grief with 4627
is one of the things that's been fixed in 7159
(which I wasn't aware of).

Maybe RFC 7159 is not ambiguous now.  (The versions
that's up now 
, but ECMA 404 does not have
anything like the text cited from RFC 7159.

The original specification of JSON said that it was a
*binary* format where characters must be encoded as UTF-8.
RFC 7159 says that it SHALL be UTF-8, UTF-16, or UTF-32
but then forbids the use of a BOM!

In contrast, ECMA 404 defines JSON as a sequence of Unicode
code-points, saying nothing about encoding.
Presumably an ECMA-404-compliant implementation of JSON
could use UTF-16 *with* a BOM, or SCSU, or some private
encoding convention...

I think you will agree that the existence of *two*
standards (RFC 7159 and ECMA 404) with differing content
is a problem all by itself.





More information about the erlang-questions mailing list