Re: [Json] Limitations on number size?

Stephan Beal <sgbeal@googlemail.com> Tue, 09 July 2013 14:33 UTC

Return-Path: <sgbeal@googlemail.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 E35C921F9F36 for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 07:33:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 Z18Dw2nEaVPe for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 07:33:51 -0700 (PDT)
Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) by ietfa.amsl.com (Postfix) with ESMTP id E311D21F9EDF for <json@ietf.org>; Tue, 9 Jul 2013 07:33:50 -0700 (PDT)
Received: by mail-wi0-f174.google.com with SMTP id k10so10257065wiv.7 for <json@ietf.org>; Tue, 09 Jul 2013 07:33:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HGw9U6KOpbeBN3lqT7mwWvTmuL+GF4Sn4Nki4MmLHLY=; b=FJUOrPAiesl2lbUrq9yvpKwIRi3W7ccLoW33amZjTS6fVNs5hS4wvRCzbfzzO7QqsE Ho2gNDMwyj/e7xPKD1J+sP+AOSS3sAdA7kscZg4iuZygZyX102hzZU0V8g2jeKjqqcvi AFCVH2oIOn/7fNZn1U9/gd8aPYjasjK2ZmrnqndesKgbGbYErhSnC3TkQGWiRD2raUgx uQJ2/enRkUwq1OllaSlK24KATXgqeePX7ETEmo7SwwI5D/uFqTzs0zLku2Few367Ntvw /2O9UPC8byzI1HM54F6iGUtg+L6BzLEWdLCnA2MqydgWnVybbSwpOsBjH1H3ZElFwxFK 3BJg==
MIME-Version: 1.0
X-Received: by 10.194.249.231 with SMTP id yx7mr15540445wjc.13.1373380429983; Tue, 09 Jul 2013 07:33:49 -0700 (PDT)
Received: by 10.194.1.241 with HTTP; Tue, 9 Jul 2013 07:33:49 -0700 (PDT)
In-Reply-To: <51DC0F95.7010407@gmail.com>
References: <51DC0F95.7010407@gmail.com>
Date: Tue, 9 Jul 2013 16:33:49 +0200
Message-ID: <CAKd4nAir=9iyNFUmVXT1Wmd0VGuG-ikOA_kP31L45oKVdrpBMw@mail.gmail.com>
From: Stephan Beal <sgbeal@googlemail.com>
To: "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary=001a11c29cc4abb99504e1150c2b
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, 09 Jul 2013 14:33:53 -0000

On Tue, Jul 9, 2013 at 3:26 PM, Peter F. Patel-Schneider <
pfpschneider@gmail.com> wrote:

> My informed understanding of JSON, from reading all the relevant
> documents, was (and again is) also that JSON numbers are ECMAScript numbers
> are IEEE floating point doubles (minus some odd bits).  I was astonished to
> find out that some people disagree, apparently to the point that they
> believe that 0 is different from .0
>

My (also informed) interpretation differs significantly ;). My last reading
of the RFC didn't reveal any mention of numeric precision. i.e. an
implementation which supports 5-bit precision is, from my reading of the
RFC, completely legal (it only has to be able to read a number with the
digits 0-9).


Not being clear on the primitive data types in JSON is a very bad thing, in
> my opinion.
>

It is impossible to require a specific precision because not all
platforms/environments can guaranty a specific precision.


> From: Jacob Davies <jacob at well.com>
> To: "json at ietf.org" <json at ietf.org>
> Date: Wed, 5 Jun 2013 10:51:58 -0700
>
> On Tue, Jun 4, 2013 at 9:05 PM, Nico Williams <nico at cryptonector.com>
> wrote:
> .,,Implementation limits on the length of strings or size of arrays or
> objects were not specified either
>


Which implies (to me) that a 5-bit-precision implementation is perfectly
legal (though obviously not very useful).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal