Re: [Json] Limitations on number size?

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> Wed, 10 July 2013 12:29 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 0BBC411E8155 for <json@ietfa.amsl.com>; Wed, 10 Jul 2013 05:29:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.417
X-Spam-Level:
X-Spam-Status: No, score=-2.417 tagged_above=-999 required=5 tests=[AWL=0.182, 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 vRWNppKa-1EZ for <json@ietfa.amsl.com>; Wed, 10 Jul 2013 05:29:44 -0700 (PDT)
Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) by ietfa.amsl.com (Postfix) with ESMTP id 9F8ED11E814D for <json@ietf.org>; Wed, 10 Jul 2013 05:29:44 -0700 (PDT)
Received: by mail-ob0-f178.google.com with SMTP id fb19so8464378obc.9 for <json@ietf.org>; Wed, 10 Jul 2013 05:29:44 -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=bwpzFccziqHCKEDlt3cvLGbsvv2GwSTmZ8uuqxh4PBE=; b=eEQaMay78GWkuQ02SZydqpQl/gSxk7OEt2rwILwzgrBHsFDNYiiQCtm722RpEOT7K+ 2j7JVwijrC4tnNAnUZ6h98ihNeskMMs315ViGXhdREARtCHgiIlrnVpZE8mNpvas7Z2n A40934JHn72lNCWt/cnV00vxx2KTNTqyOj7hEf6mqJ1eHzG7qk3RGHHqyUOwyiiydgLA 1fVuzF+iqq73zjsDhoEcGZfscAiT1HYFJNFRvziEO0kn1Twr7/GovWCA22B8MWFuQCjU FPWJ2TlwNgO8JtEkL9aVc1mV79lgtsw0SaaNo0aO8zFKbGp/PCBlxsfa/qBWX/r4RmgM I6pg==
X-Received: by 10.182.130.228 with SMTP id oh4mr27997816obb.38.1373459384204; Wed, 10 Jul 2013 05:29:44 -0700 (PDT)
Received: from [192.168.1.101] (out-on-181.wireless.telus.com. [207.219.69.181]) by mx.google.com with ESMTPSA id fk3sm43417986obb.2.2013.07.10.05.29.42 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jul 2013 05:29:43 -0700 (PDT)
Message-ID: <51DD53B4.6030207@gmail.com>
Date: Wed, 10 Jul 2013 05:29:40 -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: Stephan Beal <sgbeal@googlemail.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> <51DC95B2.8080801@gmail.com> <20130709231139.GC8043@gmail.com> <51DCA042.4000303@gmail.com> <CAKd4nAjHE8_4hWMG7jSzv=_VsoKb-cqNdX4CR+6R-p1WkQnDTQ@mail.gmail.com> <51DD3248.3020008@gmail.com> <CAKd4nAj66kGWvRGTUtwg_238LuiZ47jRLWAaCho2jH69Qu7ZUg@mail.gmail.com>
In-Reply-To: <CAKd4nAj66kGWvRGTUtwg_238LuiZ47jRLWAaCho2jH69Qu7ZUg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "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 12:29:47 -0000

On 07/10/2013 03:15 AM, Stephan Beal wrote:
>
> On Wed, Jul 10, 2013 at 12:07 PM, Peter F. Patel-Schneider 
> <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>> wrote:
[...]
>
>
>     However, the working group mailing archives contain evidence that there
>     are indeed significant problems when using JSON to portably interchange
>     data, particularly  binary data.
>
>
> Such cases are their own fault: JSON never, every claimed to be able to 
> support binary data. Wrong tool for the job, period.

That's one opinion (which I agree with, by the way), but there appears to be 
significant support for a different opinion.

[...]
> Excellent point - no, they [users] are most certainly not aware of all 
> potential problems, and that's why they rely on the system-level defaults - 
> because they know that very smart people [the IETF JSON working group?] have 
> spent time implementing them and making sure they are reasonable for a wide 
> variety of use cases. Least common denominator.

But what is this least common denominator?  There was a (probably not serious) 
post that suggested that 5-bit JSON numbers would be viable.  There were 
serious posts suggesting that one should not count on anything more than 
32-bit (signed) integers, i.e., that 0.1 or even 0.0 might be rejected by some 
JSON implementations.

[...]
>
>     The RDF W3C workiing group is in the last stages of putting its stamp of
>     approval on JSON-LD, which presents the JSON numbers 0 and 0.0 to RDF as
>     being different.
>
>
> Different standard - doesn't interest me ;). i don't have a single 
> application where the difference between 0 and 0.0 is relevant to the 
> outcome of a calculation (with the minor exception of maybe output formatting).

I find this particular attitude very troubling, even spoken in jest.  You may 
not care whether the JSON numbers 0 and 0.0 represent different things, but 
others do, and are about to push an answer into a W3C recommendation.   In my 
opinion, it should be the goal of any standard (or quasi-standard) setting 
body to try to cover all the reasonable cases (without, of course, getting 
bogged down on things like how many Unicode surrogate characters can dance on 
the head of a JSON string).
>
> -- 
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
>
>
Peter F. Patel-Schneider