Re: [Json] JSON irritants

Wendy Roome <> Wed, 03 August 2016 15:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 224B512DC60 for <>; Wed, 3 Aug 2016 08:09:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -6.901
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Yg_9iIlJrqUZ for <>; Wed, 3 Aug 2016 08:09:37 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8DD4912D5AF for <>; Wed, 3 Aug 2016 08:08:04 -0700 (PDT)
Received: from (unknown []) by Websense Email Security Gateway with ESMTPS id 6470392016BC1; Wed, 3 Aug 2016 15:08:01 +0000 (GMT)
Received: from ( []) by (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 ( []) by (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 [] ( []) by (8.13.8/TPES) with ESMTP id u73F7v4O012060; Wed, 3 Aug 2016 10:07:58 -0500 (CDT)
User-Agent: Microsoft-MacOutlook/
Date: Wed, 03 Aug 2016 11:08:23 -0400
From: Wendy Roome <>
To: John Cowan <>, "Manger, James" <>
Message-ID: <>
Thread-Topic: [Json] JSON irritants
References: <> <> <>
In-Reply-To: <>
Mime-version: 1.0
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Archived-At: <>
Cc: Tim Bray <>, "" <>
Subject: Re: [Json] JSON irritants
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 03 Aug 2016 15:09:41 -0000

On 08/03/2016, 09:39, "John Cowan²,> 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.


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


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