Re: [Json] I-JSON Topic #5: Numbers

Stefan Drees <> Wed, 30 April 2014 06:04 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 909FB1A09C5 for <>; Tue, 29 Apr 2014 23:04:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.55
X-Spam-Status: No, score=-1.55 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id VPv8BfQ78qZ9 for <>; Tue, 29 Apr 2014 23:04:06 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 7E79A1A09DF for <>; Tue, 29 Apr 2014 23:04:04 -0700 (PDT)
Received: from ([]) by (mrweb102) with ESMTPSA (Nemesis) id 0Le4Po-1XDN4H2Ltc-00prQU for <>; Wed, 30 Apr 2014 08:04:01 +0200
Message-ID: <>
Date: Wed, 30 Apr 2014 08:04:00 +0200
From: Stefan Drees <>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
References: <> <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:KXfu1UyVAMTT7/XAn3WpOdtfUvNtjRb1Sc4nG5iDp4u++9f96xb 0XFjgMITSASmASFRa4x+wW6XFoQ6WMRC9S0e4pP+4uACQV3fMbVvB0NqnuDsW+87OM2zpP9 t9mZrnx4SG81cUTbBjRtrxg6XvgobhveJIo/xvr6ivcgBN34YdIqGHxARfox+UE8waDD6n0 ZZVwqasMP6fXc86qTdnXg==
Subject: Re: [Json] I-JSON Topic #5: Numbers
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 30 Apr 2014 06:04:08 -0000

Am 29.04.14 19:33, schrieb Paul Hoffman:
> <no hat>
>> "draft-i-json-01 says that you MUST not put in a string representing a
>> number with greater precision/magnitude than IEEE754 doubles can
>> support.   I think this is a good idea but I'm a little nervous
>> because I've never written the code; if this is unreasonably hard at
>> either the sending or receiving end someone should say so."
> From the comments so far, it seems like it is not clear how to make
> such restrictions in some languages. If we can't be definitive about
> what we mean, we should remove it. RFC 7159 has pretty strong wording
> already.

from another context I remember, that being definitive here is 
complicated (at least when a generic consumer of the message is assumed)

There are clients that simply cannot digest a number being larger than 
IEEE754 doubles. In a robust scenario, I would expect, that in that 
case, they reparse that token as a decorated (client side) string and 
try to apply local rules in handling what has been received in that "slot".

Clients that can digest numbers of arbitrary length on the other hand 
would be "slowed down" when all numbers not fitting in IEEE754 doubles 
would be string-wrapped.

JSON strengths are not with types or schemas, but it also helps the 
client, when every value of identically named keys or constituents of 
arrays are of the same "kind" at least in moretrusted setups.

So for me it would be ok to remove it, as no matter how we resolve it, 
from the above mentioned 3 "viewpoints" there are always some "local 
rules" or extra effort involved to handle the general case, which we 
must describe or leave out.

{"stefan": "All the best."}