Re: [Json] JSON irritants

Wendy Roome <wendy.roome@nokia-bell-labs.com> Wed, 03 August 2016 15:09 UTC

Return-Path: <wendy.roome@nokia-bell-labs.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 224B512DC60 for <json@ietfa.amsl.com>; Wed, 3 Aug 2016 08:09:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.901
X-Spam-Level:
X-Spam-Status: No, score=-6.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yg_9iIlJrqUZ for <json@ietfa.amsl.com>; Wed, 3 Aug 2016 08:09:37 -0700 (PDT)
Received: from smtp-us.alcatel-lucent.com (us-hpatc-esg-02.alcatel-lucent.com [135.245.18.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8DD4912D5AF for <json@ietf.org>; Wed, 3 Aug 2016 08:08:04 -0700 (PDT)
Received: from us70tumx2.dmz.alcatel-lucent.com (unknown [135.245.18.14]) by Websense Email Security Gateway with ESMTPS id 6470392016BC1; Wed, 3 Aug 2016 15:08:01 +0000 (GMT)
Received: from us70tusmtp2.zam.alcatel-lucent.com (us70tusmtp2.zam.alcatel-lucent.com [135.5.2.64]) by us70tumx2.dmz.alcatel-lucent.com (GMO) with ESMTP id u73F83km021076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Aug 2016 15:08:03 GMT
Received: from umail.lucent.com (umail.ndc.lucent.com [135.3.40.61]) by us70tusmtp2.zam.alcatel-lucent.com (GMO) with ESMTP id u73F80SO026533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Aug 2016 15:08:02 GMT
Received: from [135.222.152.71] (wdr-i7mbp2.mh.lucent.com [135.222.152.71]) by umail.lucent.com (8.13.8/TPES) with ESMTP id u73F7v4O012060; Wed, 3 Aug 2016 10:07:58 -0500 (CDT)
User-Agent: Microsoft-MacOutlook/14.6.6.160626
Date: Wed, 03 Aug 2016 11:08:23 -0400
From: Wendy Roome <wendy.roome@nokia-bell-labs.com>
To: John Cowan <cowan@mercury.ccil.org>, "Manger, James" <James.H.Manger@team.telstra.com>
Message-ID: <D3C77C65.82B25F%w.roome@alcatel-lucent.com>
Thread-Topic: [Json] JSON irritants
References: <CAHBU6iv+S5=bxh62G+ybcgUWzQLUngVSti8X1ptENn0fA=i3ng@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E13BFDE57E14@WSMSG3153V.srv.dir.telstra.com> <20160803133945.GC30359@mercury.ccil.org>
In-Reply-To: <20160803133945.GC30359@mercury.ccil.org>
Mime-version: 1.0
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/pjPuEYrfikJJxxHCpBQSpVl9NLY>
Cc: Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] JSON irritants
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 03 Aug 2016 15:09:41 -0000


On 08/03/2016, 09:39, "John Cowan², cowan@mercury.ccil.org> wrote:

>Manger, James scripsit:
>
>> Yuck for i800 and f49.399. I¹d prefer the presence of a decimal
>> point ³.² or exponent symbol ³e² to imply a float; and their
>> absence to imply an integer.
>
>+1.  That is how my JSON parser works in any case.


Ditto.

>
>> Optional commas sounds okay. I wouldn¹t like to forbid them as
>> [11, 234, 5, 6] is nicer than [11 234 5 6].
>
>I think an important point is being allowed to include a redundant
>final comma.

An optional final comma would be very convenient. But I think optional
separator commas, with some rule to impute a comma at the end of a line,
is a bad idea. Suppose the json runs thru a compressor that automagically
squeezes out unnecessary white space. The result would be illegal unless
the compressor understood the new rules.

>
>> Encouraging yyyy-mm-ddThh:mm:ss[.sssŠ]Z for instants of time is
>> great. I¹m less sure that distinguishing it from a string is so
>> crucial.
>
>Mmm, I think it's good to have it as a separate type.  I don't see any
>need for the @ prefix, though.  A date-time literal doesn't look like
>anything else.

I think that is getting too complex. Better to use strings and have the
end apps agree that this field is a date.

>
>But as someone who tried with XML 1.1 and XML 1.0 5e, I suspect that
>any such effort as this is doomed to obscurity.  The improvements
>aren't massive enough to be worth the conversion effort and loss of
>interoperability.

*SIGH*

I have to agree with that 1000%. Much as it would be nice to extend JSON
like that, interoperability will prevent it. There are *a lot* of JSON
libraries out there. When would you, as a JSON creator, think it is safe
to assume that every JSON library your client apps will use understands
the extensions? My guess is that would be about the same time that we
start worrying about the Y10K problem. :-)

For example, think about the number of time you write <tag /> instead of
<tag/>, because some early xml parser didn't handle the latter properly.

	- Wendy Roome