Re: [Json] JSON irritants

John Cowan <> Wed, 03 August 2016 15:37 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8BA5412DCC8 for <>; Wed, 3 Aug 2016 08:37:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.888
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Emx3trEOxSOx for <>; Wed, 3 Aug 2016 08:37:10 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 2084E12D66A for <>; Wed, 3 Aug 2016 08:35:37 -0700 (PDT)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1bUyCe-0007uP-AJ; Wed, 03 Aug 2016 11:35:28 -0400
Date: Wed, 03 Aug 2016 11:35:28 -0400
From: John Cowan <>
To: Wendy Roome <>
Message-ID: <>
References: <> <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <>
Archived-At: <>
Cc: Tim Bray <>, "Manger, James" <>, "" <>
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: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
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?