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

Nico Williams <nico@cryptonector.com> Mon, 08 July 2013 16:38 UTC

Return-Path: <nico@cryptonector.com>
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 4312421F9D61 for <json@ietfa.amsl.com>; Mon, 8 Jul 2013 09:38:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.548
X-Spam-Level:
X-Spam-Status: No, score=-2.548 tagged_above=-999 required=5 tests=[AWL=-0.571, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 cC84XdQK--yB for <json@ietfa.amsl.com>; Mon, 8 Jul 2013 09:38:38 -0700 (PDT)
Received: from homiemail-a16.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by ietfa.amsl.com (Postfix) with ESMTP id 6734A21F9D53 for <json@ietf.org>; Mon, 8 Jul 2013 09:38:38 -0700 (PDT)
Received: from homiemail-a16.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a16.g.dreamhost.com (Postfix) with ESMTP id 3CB0A50808D for <json@ietf.org>; Mon, 8 Jul 2013 09:38:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=81Yth1TpHNNvN4mp5xbP wn6GJaY=; b=XSCwD+D3XXLEfdiZzqMXBihUeHYK4u5l/EhNqDUp2Uz6KSqILDkC PPfzbw7+QfGvi3jsk1ArDirSCPWwiFqcL+LMAcDws/FuUVjSgNFBhpv0cvbyMMZs YZkhkGPskQfl7RSMV/E2VInPW/4exIdwY62CKx54yp8e9iClhKeqYM4=
Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a16.g.dreamhost.com (Postfix) with ESMTPSA id DCB9B508064 for <json@ietf.org>; Mon, 8 Jul 2013 09:38:37 -0700 (PDT)
Received: by mail-wi0-f177.google.com with SMTP id ey16so4165461wid.4 for <json@ietf.org>; Mon, 08 Jul 2013 09:38:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w+MGLFnT1cXNpsu07az403FYHmMlVIUy2h4imx3FxwQ=; b=RA0vqtgmdklCJhYbBckjEKMTCsg39I1j5G+V16exMaf1LU92S47RTxD0hT/1XmG63L aL2++VtnPXne1eAxDeS+mOeHmVrjDs9C0ydR2+7mIbOV28jMJbN/B/fB8cjTsMbuMwfq NWMilFXOyc/Y2LJRkrpfQiTXCXOYPigkFqrrQF++im++xg+6buQn1ViTLcd4Y1s8rdFo fi1J26AjmZAzjQGvWQApJylQh27jro29UDL0OIRJsE3Qj2EqOU32FwynjWxZOoWRZm5q MmKD7Qrc4hgLzqL1o7bjfxuMrOYFSkPVhEC5zmUJbkTdiQt4h7xce1VTUk6zIqQ1SB3w yCog==
MIME-Version: 1.0
X-Received: by 10.194.173.37 with SMTP id bh5mr13055049wjc.30.1373301516396; Mon, 08 Jul 2013 09:38:36 -0700 (PDT)
Received: by 10.216.152.73 with HTTP; Mon, 8 Jul 2013 09:38:36 -0700 (PDT)
In-Reply-To: <6milt8df307ep0rtfo2pp6ghgsiea25djb@hive.bjoern.hoehrmann.de>
References: <9326419D-73C0-4098-91F0-0E83A7FEA67A@tzi.org> <6milt8df307ep0rtfo2pp6ghgsiea25djb@hive.bjoern.hoehrmann.de>
Date: Mon, 08 Jul 2013 11:38:36 -0500
Message-ID: <CAK3OfOj5+_Wjz_4LjzxvKcZeCP4MFOgXGwhUNs5pHcCe61y6vA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Content-Type: text/plain; charset="UTF-8"
Cc: Carsten Bormann <cabo@tzi.org>, "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 16:38:43 -0000

On Mon, Jul 8, 2013 at 10:25 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> 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.

Every parser (and generator) I've seen takes options arguments.

For all our debates over this I think we'll probably just end up with
most implementations supporting both JSON forms.

> 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.

No doubt they will.

> 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.

I agree that allowing any types at the top-level seems like a
no-brainer, but others disagree vehemently, and I don't think I care
that much about that.

Nico
--