Re: [Json] Limitations on number size?

R S <sayrer@gmail.com> Wed, 05 June 2013 02:07 UTC

Return-Path: <sayrer@gmail.com>
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 76B2521F9AE5 for <json@ietfa.amsl.com>; Tue, 4 Jun 2013 19:07:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
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 i6rvf2O9d72O for <json@ietfa.amsl.com>; Tue, 4 Jun 2013 19:07:00 -0700 (PDT)
Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) by ietfa.amsl.com (Postfix) with ESMTP id 51CCA21F9ADA for <json@ietf.org>; Tue, 4 Jun 2013 19:06:59 -0700 (PDT)
Received: by mail-wg0-f53.google.com with SMTP id c11so821835wgh.8 for <json@ietf.org>; Tue, 04 Jun 2013 19:06:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QJeGQnCBdBTwa0QpOvnE96O5MchB7Tol7hAsDXnZ4ok=; b=E6//52QDOaXV8VEMoO+9+7YyEv+AHx4JKK3O2Ypzt8x8kVRV2wXYoGc/yztrJJUvMF MGomDnC9YwcXCmEJ6et0vbU+rVsAwZS2yb7I5tKHJ8bSxVWRI5Qe5aHrLVhh7XxpZzKC D/hvGYGvZbhnncqrDF5znvk/IyK6UqiNJCJF6+f8kctCTR4RPC0a3KeG1PlwGy7H1HCQ j3CBor1JOcpdaoCguLx9v1F6X97zfSnk9ibdJRS9i1CCKtBLTijV2k8iwk9lFAojeFuF h3efReko8Jo0wBuRWgdeCOjrRWp8HHRf8WAYy90r0huVWehkFl5Hj84NHH7vGD8bcGk0 SkcQ==
MIME-Version: 1.0
X-Received: by 10.181.13.42 with SMTP id ev10mr4164789wid.1.1370397987509; Tue, 04 Jun 2013 19:06:27 -0700 (PDT)
Received: by 10.194.83.35 with HTTP; Tue, 4 Jun 2013 19:06:27 -0700 (PDT)
In-Reply-To: <BF7E36B9C495A6468E8EC573603ED9411527BC7D@xmb-aln-x11.cisco.com>
References: <CAK3OfOgPGi4PKxKAGEG=PCv-xaszMqWpUUUH2B9f0UaeMMO1gQ@mail.gmail.com> <C42654A3-E218-45A8-B368-4A60CB89619D@vpnc.org> <C4D8E604-E4F8-408B-B7DD-97226300C212@tzi.org> <CAK3OfOjDp=S=HZ5LTP3L+rqq1VjhSShakmBOJD9aPiN8fSULKw@mail.gmail.com> <C30B2D0D-75A7-49A5-A190-5AD5DC1FCDCC@vpnc.org> <CAK3OfOi6uNcXLCcStg90j2LqqdyVWQeoBAd0Mad-EjFEDyixpw@mail.gmail.com> <51AE63B1.80800@crockford.com> <CAChr6Szu11Qtbc9JGrG-bNvq=SCN-f81dZ1GoH_sz+KvddE0nw@mail.gmail.com> <BF7E36B9C495A6468E8EC573603ED9411527BC7D@xmb-aln-x11.cisco.com>
Date: Tue, 4 Jun 2013 19:06:27 -0700
Message-ID: <CAChr6SxzAQ+MFG60foM915Za+nroo6yy=JL1N40dZsx84u6rMg@mail.gmail.com>
From: R S <sayrer@gmail.com>
To: "Matt Miller (mamille2)" <mamille2@cisco.com>
Content-Type: multipart/alternative; boundary=f46d04388df13f1e1404de5ea542
Cc: Nico Williams <nico@cryptonector.com>, Paul Hoffman <paul.hoffman@vpnc.org>, Douglas Crockford <douglas@crockford.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Limitations on number size?
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: Wed, 05 Jun 2013 02:07:02 -0000

On Tue, Jun 4, 2013 at 6:46 PM, Matt Miller (mamille2)
<mamille2@cisco.com>wrote;wrote:

>
> On Jun 4, 2013, at 7:40 PM, R S <sayrer@gmail.com>
>  wrote:
>
> > On Tue, Jun 4, 2013 at 3:01 PM, Douglas Crockford <douglas@crockford.com
> >wrote:
> >
> >>
> >> Keep in mind that this format has been working successfully in the wild
> >> for over a decade. The goal here should be to do the least that is
> >> necessary to formally upgrade its status from Informational, not to
> attempt
> >> to fix something that is already working well enough. It is only
> because it
> >> has been working well enough that we are considering the upgrade.
> >
> >
> >
> > Strongly agree. We should only be changing things that are incorrect or
> > obsolete. You can't write an interoperable JSON implementation by reading
> > RFC 4627 at the moment, but number precision is not one of the
> > deal-breakers.
> >
>
> Would you be willing to contribute specific wording proposals to address
> those deal-breakers?
>


Sure. I wrote a reasonably good JSON implementation after RFC 4627 but
before ES5, and then had to update it to work on the Internet after ES5. We
also have code at my current employer that will break if certain numbers
are not transmitted as strings. It's workable, although inconvenient.

That said, I am also pretty sure that Douglas knows which changes from ES5
need to go in. The main concerns for me are changes to the grammar that
allow more than just objects and arrays as the root value, and the
allowance in RFC 4627 for syntactic extensions (that is not realistic given
ES5 rules).

On the issue at hand, it might be good to rewrite the beginning of the
"Number" section along these lines:

- The representation of numbers is similar to that used in most programming
languages.
+ JSON numbers are arbitrary precision, and represented in a manner similar
to that used in most programming languages.

The current RFC is a little under-specified.

- Rob