Re: [Json] I-JSON vs. JSON-S

Bjoern Hoehrmann <derhoermi@gmx.net> Mon, 08 July 2013 15:25 UTC

Return-Path: <derhoermi@gmx.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3964D21F9A57 for <json@ietfa.amsl.com>; Mon, 8 Jul 2013 08:25:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.562
X-Spam-Level:
X-Spam-Status: No, score=-2.562 tagged_above=-999 required=5 tests=[AWL=0.038, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c-JwMV1Op8cf for <json@ietfa.amsl.com>; Mon, 8 Jul 2013 08:25:30 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by ietfa.amsl.com (Postfix) with ESMTP id 14A1921F8F38 for <json@ietf.org>; Mon, 8 Jul 2013 08:25:30 -0700 (PDT)
Received: from netb.Speedport_W_700V ([91.35.54.144]) by mail.gmx.com (mrgmx102) with ESMTPA (Nemesis) id 0LrIPo-1UCwJe1ZYi-0137JL; Mon, 08 Jul 2013 17:25:28 +0200
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Carsten Bormann <cabo@tzi.org>
Date: Mon, 08 Jul 2013 17:25:25 +0200
Message-ID: <6milt8df307ep0rtfo2pp6ghgsiea25djb@hive.bjoern.hoehrmann.de>
References: <9326419D-73C0-4098-91F0-0E83A7FEA67A@tzi.org>
In-Reply-To: <9326419D-73C0-4098-91F0-0E83A7FEA67A@tzi.org>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:xu4PM8phKZx31+GSJgy7m3CdjGQGaHzmEXgzqj9vTvbT4pGybqD ezsaxZW5ZO2enyJdjInaWuTIwv9tjR6DfaXgw1hFA0y5UaFyV+DUXwquZS3muIt0xRr619n EkKf3vhKQawSPl+6iAdZ7gJrJ/wtmmlnyW1VUjqXJCEAanWZIxie+gT1r28ubqpp6uYg9Ds i+e+CPA4Nh7zbxTckQZmg==
Cc: "json@ietf.org WG" <json@ietf.org>
Subject: Re: [Json] I-JSON vs. JSON-S
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Jul 2013 15:25:35 -0000

* Carsten Bormann wrote:
>When people talk about "not breaking things", it is just not clear
>whether they mean "carry along all usages of JSON-S" or "make sure all
>I-JSON implementations stil interoperate flawlessly".  That's why the
>current charter may have less of a defined meaning than it appears.
>Unless the two levels of interoperability are clearly identified, it
>is not possible to break neither.

http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/ proposes that the
XMLHttpRequest implementations parse JSON HTTP responses by way of

  JSON.parse(decode_utf8_with_bom_and_error_recovery(bytes))

That extends and subsets what is defined in RFC 4627. If this is imple-
mented as proposed, and my parser does something else, I may eventually
have to deal with bug reports telling me "but it works with XHR". And I
might have to adapt my parser. Same for many other implementations.

http://www.w3.org/TR/2012/WD-xslt-30-20120710/#func-parse-json proposes
a `parse-json` function that takes option parameters like "RFC4627" and
"ECMA-262" to select among JSON profiles. People seeing this might ask
that my parser also has such options.

We could take RFC4627-JSON, remove unpaired surrogate escapes and dupli-
cate keys and call it RFC7xxx-JSON, but that would make ECMA-JSON and
RFC-JSON more different. RFC4627-JSON with all values at the top level
allowed would make them more similar. It would improve our understanding
of what is JSON.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/