Re: [Json] Limitations on number size?

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> Tue, 09 July 2013 22:59 UTC

Return-Path: <pfpschneider@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 9F17321F9CD7 for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 15:59:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.633
X-Spam-Level:
X-Spam-Status: No, score=-1.633 tagged_above=-999 required=5 tests=[AWL=-1.200, BAYES_00=-2.599, FF_IHOPE_YOU_SINK=2.166]
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 NjFD6hSbwVIo for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 15:59:10 -0700 (PDT)
Received: from mail-oa0-x22a.google.com (mail-oa0-x22a.google.com [IPv6:2607:f8b0:4003:c02::22a]) by ietfa.amsl.com (Postfix) with ESMTP id BEF7221F9CCC for <json@ietf.org>; Tue, 9 Jul 2013 15:59:09 -0700 (PDT)
Received: by mail-oa0-f42.google.com with SMTP id j6so8846402oag.15 for <json@ietf.org>; Tue, 09 Jul 2013 15:59:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TqnuDkH9WyOwtAM4L3axMuGOc/KZDlOLkNqgdxieBl4=; b=AsfaRE1rumNKATY9A4p8qJlhF1kRqH+c9JrsZHWgaY15oGN3BnGDwIsbOot/l4C75y xMJDbc/m5zlJfNheNuxWconjTNw1LiSSxsjxsKPU0SNc8iKn9zXFd2rIOuxVRs/LlVAY oR8csYDc8c5hqSo8SlgWWi0NIL6Cr/7+24rIRUdDVOoCuzttK1nbN3jxUR6c0wb2vKIH YXbsNIEre+zDDh7Aeyvtl8euX26RWTfPyDbMOMtRsB3mnqCyRTDygnDh+78fUi5Qim6K Nu3WiLAfPKM6KqmHmOnUFVnrKL33OUtLsMwnxMOjHB+vpEX32rg7AWQAjYseIiCrXvfy Nv3Q==
X-Received: by 10.60.96.170 with SMTP id dt10mr25779479oeb.81.1373410749387; Tue, 09 Jul 2013 15:59:09 -0700 (PDT)
Received: from [192.168.1.102] (out-on-158.wireless.telus.com. [207.219.69.158]) by mx.google.com with ESMTPSA id m11sm41364814oer.4.2013.07.09.15.59.04 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Jul 2013 15:59:08 -0700 (PDT)
Message-ID: <51DC95B2.8080801@gmail.com>
Date: Tue, 09 Jul 2013 15:58:58 -0700
From: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130514 Thunderbird/17.0.6
MIME-Version: 1.0
To: Tatu Saloranta <tsaloranta@gmail.com>
References: <51DC0F95.7010407@gmail.com> <hf8ot8hnpa93pi3t54c4d5qcc3p5tnb3ca@hive.bjoern.hoehrmann.de> <CAK3OfOgTNaLpRthrRcU4Bo+3z1aXUOOn0Ord7RBPN8z6TtiiWw@mail.gmail.com> <51DC7F87.6060503@gmail.com> <CAGrxA24v5L7oCGxEOwecJSLCNiLrSWSt=jFJMA0M9E8fztNLag@mail.gmail.com>
In-Reply-To: <CAGrxA24v5L7oCGxEOwecJSLCNiLrSWSt=jFJMA0M9E8fztNLag@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Nico Williams <nico@cryptonector.com>, Bjoern Hoehrmann <derhoermi@gmx.net>, "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, 09 Jul 2013 22:59:10 -0000

Where then am I supposed to go to find out what a JSON number represents?   
There are many possibilities (float only, rational only, separate integer and 
float, separate rational and float, variable-precision decimal only, separate 
integer and variable-precision decimal, variable precision float only, ...). 
And then there are the various range possibilities.

The only suitable guidance provided in RFC4627 is via ECMAScript and 
ECMAScript is firmly IEEE floating point double only.

So why are you surprised that I came up with this conclusion?

peter



On 07/09/2013 02:34 PM, Tatu Saloranta wrote:
> I am surprised you came to this conclusion, since I assumed we were finally 
> getting rid of misconception that JSON is closely tied to Javascript.
>
> This is not to say that the way JSON (under-)defines numbers is optimal; but 
> at this point forcing castrated version of numbers -- which would lead to 
> practical problems like preventing use of 64-bit longs for timestamps -- 
> would be counter-productive and to me a non-starter.
>
> -+ Tatu +-
>
>