Re: [Json] 2-step proposal 4627bis + I-JSON

John Cowan <> Thu, 04 July 2013 00:27 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 7263111E8195 for <>; Wed, 3 Jul 2013 17:27:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.579
X-Spam-Status: No, score=-3.579 tagged_above=-999 required=5 tests=[AWL=0.020, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id KCvyDfIuVtlb for <>; Wed, 3 Jul 2013 17:27:33 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 6369E11E80E4 for <>; Wed, 3 Jul 2013 17:27:33 -0700 (PDT)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1UuXOW-0007mH-BG; Wed, 03 Jul 2013 20:27:32 -0400
Date: Wed, 3 Jul 2013 20:27:32 -0400
From: John Cowan <>
To: Tim Bray <>
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 <>
Cc: "" <>
Subject: Re: [Json] 2-step proposal 4627bis + I-JSON
X-Mailman-Version: 2.1.12
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: Thu, 04 Jul 2013 00:27:37 -0000

Tim Bray scripsit:

> 2. Recharter in a way that will allow us to produce something like a
> strawman I cooked up, I-JSON:
> Produce something like that. Second victory!

This is a fine trial balloon.  I have two comments:

1) I do not understand the rationale of Section 2, which amounts to
saying that the top-level datum SHOULD NOT be an array.  The presence
of the string "urn:ietf:i-json" as the first element of the array would
serve the same purposes of self-identification, and an array (unlike an
object) will be serialized in order by any conformant serializer.  As for
extensibility, it is obvious that an array can be extended by adding
new elements to the end if the elements are semantically heterogeneous,
and if they are homogeneous, there is nothing to extend.

2) Stating the precision of numbers does not suffice: you ought also to
state explicitly that the valid range is numbers whose absolute value is
between 2^-1074 and (1 + (1 - 2^52)) * 2^1023, inclusive.  For example,
the integer 4503599627370497 is not exactly representable as a double (it
is 2^52+1) and ought not to be allowed in I-JSON.  So I still prefer my
proposal of "is exactly representable as an IEEE 754:2008 64-bit binary
floating point number".

A mosquito cried out in his pain,               John Cowan
"A chemist has poisoned my brain!"    
        The cause of his sorrow       
        Was para-dichloro-
Diphenyltrichloroethane.                                (aka DDT)