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

John Cowan <cowan@mercury.ccil.org> Thu, 04 July 2013 00:27 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 7263111E8195 for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 17:27:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.579
X-Spam-Level:
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 mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KCvyDfIuVtlb for <json@ietfa.amsl.com>; Wed, 3 Jul 2013 17:27:33 -0700 (PDT)
Received: from earth.ccil.org (earth.ccil.org [192.190.237.11]) by ietfa.amsl.com (Postfix) with ESMTP id 6369E11E80E4 for <json@ietf.org>; Wed, 3 Jul 2013 17:27:33 -0700 (PDT)
Received: from cowan by earth.ccil.org with local (Exim 4.72) (envelope-from <cowan@ccil.org>) id 1UuXOW-0007mH-BG; Wed, 03 Jul 2013 20:27:32 -0400
Date: Wed, 03 Jul 2013 20:27:32 -0400
From: John Cowan <cowan@mercury.ccil.org>
To: Tim Bray <tbray@textuality.com>
Message-ID: <20130704002732.GV32044@mercury.ccil.org>
References: <CAHBU6itqGgndUKRUHH_q6fv8jonGL3VVHhkezFne0sC3T12c_Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAHBU6itqGgndUKRUHH_q6fv8jonGL3VVHhkezFne0sC3T12c_Q@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <cowan@ccil.org>
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] 2-step proposal 4627bis + I-JSON
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: 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: https://www.tbray.org/tmp/i-json.html
> 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!"              http://www.ccil.org/~cowan
        The cause of his sorrow                 cowan@ccil.org
        Was para-dichloro-
Diphenyltrichloroethane.                                (aka DDT)