Re: [Json] Limitations on number size?

Tim Bray <tbray@textuality.com> Tue, 04 June 2013 21:42 UTC

Return-Path: <tbray@textuality.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 D1D7E21F92C5 for <json@ietfa.amsl.com>; Tue, 4 Jun 2013 14:42:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.452
X-Spam-Level:
X-Spam-Status: No, score=0.452 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_SORBS_DUL=0.877, RDNS_NONE=0.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 e0TW3IA6vO3u for <json@ietfa.amsl.com>; Tue, 4 Jun 2013 14:42:22 -0700 (PDT)
Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [IPv6:2607:f8b0:400c:c02::22e]) by ietfa.amsl.com (Postfix) with ESMTP id 78D3521F8459 for <json@ietf.org>; Tue, 4 Jun 2013 12:16:10 -0700 (PDT)
Received: by mail-vb0-f46.google.com with SMTP id 10so469408vbe.19 for <json@ietf.org>; Tue, 04 Jun 2013 12:16:09 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=RleMXqGDD5BA96o01lO0wBR0lDLGdV1etWDN3lLxMiQ=; b=lsKCuj4EQGXh7L36yklN2T9ho52W4ssHJqKU3jeagl6CTd6U7CWggbGdRUcrJFgZOB +xai21lb73QeceLgYnK7NcHJHH+lp4+oZQX4mkvnpkjzjCERNWzayrjc+pt9+07hgFS/ yOUH1wr6HDFUEPa0+Cr8SypMntAxpLTjicV1188yZG3vFkwvo6g7X0hZnMyLZnJTOxxJ JotTiVXcMzd1wN9aUuUukssFju4m2CtjWbKR8RJNo3fdbOax0FqKlMGYCsgMMnKe6kt6 2PwfU1PBohaLstzj86RXIA5+/Tr5CwtRaig2IehD71FWiKrsJw4i7zohS5+WHwWkpSxV t1Xw==
MIME-Version: 1.0
X-Received: by 10.52.91.77 with SMTP id cc13mr146405vdb.79.1370373369777; Tue, 04 Jun 2013 12:16:09 -0700 (PDT)
Received: by 10.220.48.14 with HTTP; Tue, 4 Jun 2013 12:16:09 -0700 (PDT)
X-Originating-IP: [96.49.81.176]
In-Reply-To: <CAK3OfOi6uNcXLCcStg90j2LqqdyVWQeoBAd0Mad-EjFEDyixpw@mail.gmail.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>
Date: Tue, 4 Jun 2013 12:16:09 -0700
Message-ID: <CAHBU6iso3wvEdhBxRnDS-USg_=EPJH8BNYa7yVo0iy3eD-wO6g@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Nico Williams <nico@cryptonector.com>
Content-Type: multipart/alternative; boundary=20cf307f333aea640004de58e9fd
X-Gm-Message-State: ALoCoQlsVdcu8Mm9wC/iW20zdx+F0aRZgk1RXhhcjD5michyiEtZkRNOCG8+mBubM5GVTBXfptZR
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, "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: Tue, 04 Jun 2013 21:42:26 -0000

I think that once we’re finished with 4627-bis, it would be a good idea to
do a JSON-best-practices RFC.  I have lots of ideas for things that could
go in there, most probably uncontroversial.

But for now, let’s just document the syntax & semantics.  JSON allows you
to transmit numbers of a magnitude that are likely to cause grief in
certain classes of recipient.  The industry seems to deal with this pretty
well.  -T


On Tue, Jun 4, 2013 at 11:05 AM, Nico Williams <nico@cryptonector.com>wrote;wrote:

> On Tue, Jun 4, 2013 at 9:07 AM, Paul Hoffman <paul.hoffman@vpnc.org>
> wrote:
> > And this is the point where one of the chairs says "please suggest
> specific wording changes to RFC 4627". (FWIW, Doug just got the XML for the
> bis draft yesterday, and we'll probably have the -00 soon, but that should
> not delay people making specific suggestions for wording changes.)
>
> I think we need at least a note on interoperability, stating that
> ECMAScript can only handle IEEE 754 64-bit numbers, other applications
> might handle only 64-bit two's complement, others might handle bignum
> integers, and yet others might handle arbitrary size reals.
>
> Applications have to agree a priori on some schema (out of scope), and
> this is part of that.
>
> Should there be any advice to decoder implementors as to how to handle
> numbers they cannot natively represent?
>
> Nico
> --
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>