Re: [Json] Limitations on number size?

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> Wed, 10 July 2013 01:47 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 7FC0811E80F4 for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 18:47:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.367
X-Spam-Level:
X-Spam-Status: No, score=-2.367 tagged_above=-999 required=5 tests=[AWL=0.232, BAYES_00=-2.599]
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 AF9+nqs10vMW for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 18:47:22 -0700 (PDT)
Received: from mail-oa0-x229.google.com (mail-oa0-x229.google.com [IPv6:2607:f8b0:4003:c02::229]) by ietfa.amsl.com (Postfix) with ESMTP id DDB0511E80EC for <json@ietf.org>; Tue, 9 Jul 2013 18:47:21 -0700 (PDT)
Received: by mail-oa0-f41.google.com with SMTP id n10so9022272oag.14 for <json@ietf.org>; Tue, 09 Jul 2013 18:47:21 -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=y9v3MGFnN/tF8KxY2Yo44s5kZRCl5hl/s3JvAVinZpA=; b=OXwRq+4w/7S7lLh2EEQnjDnbX1K12Li2NHGTL2Ul0XOeVuKsjHVUcZhi3YpveuDTXv NslTQWDFOPZjTrOsdlufgtYpXbvkvafpJnAeJoWDLmb/JWt7VVBi9cSCT1vp+ANv0JMd EkOZs3UQLv9QnGb1//5I5jiXVwwS53GCCPhSVggOrL+ZpZSC/5rrxDJ8L529dkvNvTE2 aEqq5eiDbp50nuaxxUaJHk9gfYHUUlxUUWM9yOXJ1TAK5uZyjTxFU4g2koyOlSYpl1ZW 6TKf2pUESSAvcmXnupM/tew4vj/x0XJMSN50fwgwlhVUcAPoaXUuj5k5X/ToNMGFmI82 SYcg==
X-Received: by 10.182.34.166 with SMTP id a6mr19308009obj.102.1373420841048; Tue, 09 Jul 2013 18:47:21 -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 q4sm41421915obl.1.2013.07.09.18.47.15 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Jul 2013 18:47:20 -0700 (PDT)
Message-ID: <51DCBD22.3060000@gmail.com>
Date: Tue, 09 Jul 2013 18:47:14 -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> <D3773B95-FF52-45D7-BE9F-2DEC92AFA67E@jorgechamorro.com> <51DC92B1.7000908@gmail.com> <CAGrxA27-LQA=KVdSxq5CngesSYqGbqAu9LYV+fMUWaY5cke-FA@mail.gmail.com>
In-Reply-To: <CAGrxA27-LQA=KVdSxq5CngesSYqGbqAu9LYV+fMUWaY5cke-FA@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Nico Williams <nico@cryptonector.com>, Jorge Chamorro <jorge@jorgechamorro.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: Wed, 10 Jul 2013 01:47:22 -0000

On 07/09/2013 06:09 PM, Tatu Saloranta wrote:
> On Tue, Jul 9, 2013 at 3:46 PM, Peter F. Patel-Schneider 
> <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>> wrote:
>
>
>     On 07/09/2013 03:19 PM, Jorge Chamorro wrote:
>
>         On 09/07/2013, at 23:24, Peter F. Patel-Schneider wrote:
>
>             Imagine my surprise when I was told that my reasoning was not
>             correct.
>
>         A "JSON number" is a *text* not a number:
>
>
>     OK, OK.  A JSON number represents a number.   I'm guilty of not being
>     appropriately pedantic.
>
>     But everything that I've read about JSON indicates that JSON is supposed
>     to be used for (portably) interchanging data.  If all there is to JSON
>     is the grammar then what's the point of JSON?
>
>
> Proof is in pudding. JSON has been used successfully for years now for 
> interchanging data.
> I can't recall a case where number precision had actually been reported as a 
> problem; even though it is obvious that something could go wrong somewhere.
> So while JSON is under-specified, it turns out that actual systems have been 
> successfully built and Just Work.
>
> All alarmism aside it is easy to get tangled in the web of _potential_ 
> issues. Same is true with many discussed aspects, including mortal danger of 
> duplicate names. For some reasons it has not registered as a reported issue 
> for library implementors (as far as I know).
>
> -+ Tatu +-
>

So there is more to JSON than the grammar.

But what is this more?   I've heard quite divergent views on what this more 
is, both in the working group and, even more, outside it.

If you want to sent certain kinds of data (non-C0 ASCII strings, nothing that 
could be considered to be duplicate names in objects, 32-bit signed integers, 
...) around using JSON, then things work well, but what are the limits?  What 
happens when these limits are exceeded?

For example, the systems that I build need to know whether 0 and 0.0 represent 
the same thing because they count up the number of distinct values.

Peter F. Patel-Schneider