Re: [Json] Limitations on number size?

Douglas Crockford <> Tue, 04 June 2013 22:02 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id EAD3E21F9691 for <>; Tue, 4 Jun 2013 15:02:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id GVuKUexSA2fg for <>; Tue, 4 Jun 2013 15:02:03 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 83EF521F9339 for <>; Tue, 4 Jun 2013 15:01:37 -0700 (PDT)
Received: from [] ([]) by (node=mrus2) with ESMTP (Nemesis) id 0Lg1Ct-1U42YU3Dq7-00pfc9; Tue, 04 Jun 2013 18:01:33 -0400
Message-ID: <>
Date: Tue, 04 Jun 2013 15:01:21 -0700
From: Douglas Crockford <>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Nico Williams <>
References: <> <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:joed6aywFgya2mMfPtkPkcTqo9sRvnEhHxzhmTSWtOw Iv2jMHN0vmYE3hS41k89kjcTCLGjLGAPNCErEdma2+UYsNsGSC c71DObldDS4WlV/JTf0rf37N6uVhU8eFGH9XPUVbJcE892MTjJ MjK2xwWNWfMOEr1MloVqNfTQGM0JeUhnwt6hGQKPKfsrU7IHjD xDTOmRBPSyeLQUMOl5QgATHuNl9qOwuNPNdoBIF6F4qFUm0CyK pLHjd/NS7pl+qXUGf1bAda/SQHub4L+Uu4+t0rG+FxP/CMOx9y fk+NEE2VC7bdcdZ5sEr1aThaSrFGUQQyX0lTCND6O1XLmsg34I uBUPP5CX2TyMpXZegtqY=
Cc: Paul Hoffman <>, "" <>
Subject: Re: [Json] Limitations on number size?
X-Mailman-Version: 2.1.12
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: Tue, 04 Jun 2013 22:02:38 -0000

On 6/4/2013 11:05 AM, Nico Williams wrote:
> On Tue, Jun 4, 2013 at 9:07 AM, Paul Hoffman <> wrote:
>> And this is the point where one of the chairs says "please suggest specific wording changes to RFC 4627". (FWIW, Doug just got the XML for the bis draft yesterday, and we'll probably have the -00 soon, but that should not delay people making specific suggestions for wording changes.)
> I think we need at least a note on interoperability, stating that
> ECMAScript can only handle IEEE 754 64-bit numbers, other applications
> might handle only 64-bit two's complement, others might handle bignum
> integers, and yet others might handle arbitrary size reals.
> Applications have to agree a priori on some schema (out of scope), and
> this is part of that.
> Should there be any advice to decoder implementors as to how to handle
> numbers they cannot natively represent?
> Nico
> --
I strongly advise against fixating too much on JavaScript. JSON is 
successful because it popularized the best of JavaScript. We should not 
burden other uses of JSON with the worst of JavaScript.

Keep in mind that this format has been working successfully in the wild 
for over a decade. The goal here should be to do the least that is 
necessary to formally upgrade its status from Informational, not to 
attempt to fix something that is already working well enough. It is only 
because it has been working well enough that we are considering the upgrade.