Re: [Json] Limitations on number size?

"Markus Lanthaler" <markus.lanthaler@gmx.net> Tue, 09 July 2013 18:12 UTC

Return-Path: <markus.lanthaler@gmx.net>
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 7C53621F9CA4 for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 11:12:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.15
X-Spam-Level:
X-Spam-Status: No, score=-1.15 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MSGID_MULTIPLE_AT=1.449]
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 XlRL3YOTM8aV for <json@ietfa.amsl.com>; Tue, 9 Jul 2013 11:11:55 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by ietfa.amsl.com (Postfix) with ESMTP id 739ED21F9B18 for <json@ietf.org>; Tue, 9 Jul 2013 11:11:55 -0700 (PDT)
Received: from Vostro3500 ([178.115.250.27]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Lu2F0-1UEB0G0m8s-011SEd for <json@ietf.org>; Tue, 09 Jul 2013 20:11:54 +0200
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: json@ietf.org
References: <51DC0F95.7010407@gmail.com> <hf8ot8hnpa93pi3t54c4d5qcc3p5tnb3ca@hive.bjoern.hoehrmann.de> <CAK3OfOgTNaLpRthrRcU4Bo+3z1aXUOOn0Ord7RBPN8z6TtiiWw@mail.gmail.com>
In-Reply-To: <CAK3OfOgTNaLpRthrRcU4Bo+3z1aXUOOn0Ord7RBPN8z6TtiiWw@mail.gmail.com>
Date: Tue, 09 Jul 2013 20:11:49 +0200
Message-ID: <020801ce7ccf$c97c8ae0$5c75a0a0$@lanthaler>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Content-Language: de
Thread-Index: Ac58wrFGwtDhRHQeTpOc3VZ5PZAxxwADJ+Ig
X-Provags-ID: V03:K0:ikoab/MBM+bFRdEN8ZY9BIPHWzSm8o4v42v4DbUHCmAkczxGrzT Nq9xxK1Zw+MP2PXqwxl7f1rpCiB1DVtG0AmX/hfeTdDRVzlbqlw05PUK07A1VeS75jrGCuL dUtHLSFHZYqMuzMDAbTOKhw+XibNR/PJHzLhzjOn2FWwhMEsm3ZAQEdkT72nojXwG7Cixsy qsC9N9EJ5m5xxFM41a0jA==
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: Tue, 09 Jul 2013 18:12:01 -0000

> On Tuesday, July 09, 2013 6:38 PM, Nico Williams wrote:
> On Tue, Jul 9, 2013 at 11:23 AM, Bjoern Hoehrmann <derhoermi@gmx.net>
> wrote:
> > I think it is well-understood that if you need particularily small,
> > big, precise or otherwise unusual numbers in JSON then it's best to
> > encode them as strings so you can do the string-to-number conversion
> > at a higher level than whatever JSON library you might be using
> today.
> 
> <semifacetious>
> If that's what we should always do then why can't parsers do it
> automatically?
> </semifacetious>

Some parsers have options to support that. PHP, e.g. has a
JSON_BIGINT_AS_STRING flag.


--
Markus Lanthaler
@markuslanthaler