Re: [Json] Limitations on number size?

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> Wed, 10 July 2013 12: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 0C97E11E8180 for <json@ietfa.amsl.com>; Wed, 10 Jul 2013 05:59:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.429
X-Spam-Level:
X-Spam-Status: No, score=-2.429 tagged_above=-999 required=5 tests=[AWL=0.170, 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 U6wkApjMMJtV for <json@ietfa.amsl.com>; Wed, 10 Jul 2013 05:59:56 -0700 (PDT)
Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com [IPv6:2607:f8b0:4003:c01::236]) by ietfa.amsl.com (Postfix) with ESMTP id 86F8711E8170 for <json@ietf.org>; Wed, 10 Jul 2013 05:59:56 -0700 (PDT)
Received: by mail-ob0-f182.google.com with SMTP id va7so8270790obc.41 for <json@ietf.org>; Wed, 10 Jul 2013 05:59:54 -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=LSGQa6dvriHD1EHXzNo074fsorfc+mn2VTYao5cYWjg=; b=TF0DoIEjw06miFkiknZeNvmKQMUXKNBEOiNn80yFMvNu4wO9bk7gCHlLj1B0PepxX2 Jd5bS+tndopH2qO4NIa/CLuaDr2HvnF+VE2+Rt/vg/1w78cgi/7n9Cyacdg5BYUfrMy3 MjqTrIQYlZCsYonaGbR961FvFEAAwRKjX1rvGZwc8qJqXKM2qjOev2htcAawo/qEfRuD zN4MbrXQpr40sQc12fEbuggmLIMZ/YjurVAsEXlKD7vGLP5bRD3J5Qe1DgOIIPRkHGDT kYVtlUdy0Mntyo+hEsVoU5t8NXsEiTOWI3BmB8iYirJ62U/iw1bn78XW9gilP75srhJ/ A3fA==
X-Received: by 10.182.119.229 with SMTP id kx5mr27767030obb.23.1373461194239; Wed, 10 Jul 2013 05:59:54 -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 rs1sm43395167obb.12.2013.07.10.05.59.52 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jul 2013 05:59:53 -0700 (PDT)
Message-ID: <51DD5AC7.5010403@gmail.com>
Date: Wed, 10 Jul 2013 05:59:51 -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: Markus Lanthaler <markus.lanthaler@gmx.net>
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> <51dd5132.e686440a.1389.03a1SMTPIN_ADDED_BROKEN@mx.google.com>
In-Reply-To: <51dd5132.e686440a.1389.03a1SMTPIN_ADDED_BROKEN@mx.google.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: 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:59:57 -0000

Oops, right you are, the spec says that non-zero fractional parts are float, 
and 0.0 appears to have a zero fractional part.  My fault for not reading 
enough, particularly now that the situation is spelled out in a part of the 
document that I have been complaining about.

So now we have things the other way around - 0 and 0.0 represent the same 
thing namely the integer 0 in JSON-LD.   This is certainly a decision, and a 
decision, I think, somewhat different from the one taken by ECMAScript-based 
implementations of JSON (although it does share with them the situation that 0 
and 0.0 represent the same thing.


My apologies for misstating the situation,

peter



On 07/10/2013 05:18 AM, Markus Lanthaler wrote:
> On Wednesday, July 10, 2013 12:07 PM, Peter F. Patel-Schneider wrote:
>> I would appreciate some evidence to back up the claim that the vast, vast
>> majority of JSON is handled in an environment where the JSON numbers 0 and
> 0.0
>> do indeed represent the same thing. 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.
> That's just wrong. When converting JSON-LD to RDF both 0 and 0.0 will result
> in a "0"^^xsd:integer.
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json