Re: [Json] JSON irritants

John Cowan <cowan@mercury.ccil.org> Wed, 03 August 2016 15:37 UTC

Return-Path: <cowan@ccil.org>
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 8BA5412DCC8 for <json@ietfa.amsl.com>; Wed, 3 Aug 2016 08:37:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.888
X-Spam-Level:
X-Spam-Status: No, score=-3.888 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.287, 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 Emx3trEOxSOx for <json@ietfa.amsl.com>; Wed, 3 Aug 2016 08:37:10 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2084E12D66A for <json@ietf.org>; Wed, 3 Aug 2016 08:35:37 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1bUyCe-0007uP-AJ; Wed, 03 Aug 2016 11:35:28 -0400
Date: Wed, 03 Aug 2016 11:35:28 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Wendy Roome <wendy.roome@nokia-bell-labs.com>
Message-ID: <20160803153527.GE30359@mercury.ccil.org>
References: <CAHBU6iv+S5=bxh62G+ybcgUWzQLUngVSti8X1ptENn0fA=i3ng@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E13BFDE57E14@WSMSG3153V.srv.dir.telstra.com> <20160803133945.GC30359@mercury.ccil.org> <D3C77C65.82B25F%w.roome@alcatel-lucent.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <D3C77C65.82B25F%w.roome@alcatel-lucent.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/Qd82S1FKBjC43RWx-bF-gm2rEp0>
Cc: Tim Bray <tbray@textuality.com>, "Manger, James" <James.H.Manger@team.telstra.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:37:16 -0000

Wendy Roome scripsit:

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

If it didn't understand the new rules, it wouldn't accept [1 2 3] or
{"foo":"bar" "baz":"zam"} in the first place, so I don't think that's
a separate 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.

Actually, it's older HTML parsers that had that problem, not XML ones.
Empty-tags didn't exist when HTML was derived from SGML.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
There is no real going back.  Though I may come to the Shire, it will
not seem the same; for I shall not be the same.  I am wounded with
knife, sting, and tooth, and a long burden.  Where shall I find rest?
                --Frodo