[Json] JSON and int64s - any change in current best practice since I-JSON

Pete Cordell <petejson@codalogic.com> Tue, 16 January 2024 13:47 UTC

Return-Path: <petejson@codalogic.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 52CD6C14F5FF for <json@ietfa.amsl.com>; Tue, 16 Jan 2024 05:47:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=codalogic.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J_Ot0bkaeNA1 for <json@ietfa.amsl.com>; Tue, 16 Jan 2024 05:47:48 -0800 (PST)
Received: from sxb1nlsmtp01.prod.sxb1.secureserver.net (sxb1nlsmtp01.prod.sxb1.secureserver.net [92.204.71.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CAED8C14F5E4 for <json@ietf.org>; Tue, 16 Jan 2024 05:47:47 -0800 (PST)
Received: from codalogic.com ([92.205.28.31]) by : HOSTING RELAY : with ESMTP id Pjm8ruvMTUddHPjm8rURYa; Tue, 16 Jan 2024 06:46:45 -0700
X-SECURESERVER-ACCT: 92.205.28.31
x-originating-ip: 92.205.28.31
X-CMAE-Analysis: v=2.4 cv=CMHsHznD c=1 sm=1 tr=0 ts=65a688c5 a=JLy5cBbKnJYyhq39FObxXg==:117 a=JLy5cBbKnJYyhq39FObxXg==:17 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=cW0VwewdAAAA:8 a=3Q0cWGNyAAAA:8 a=bAM3af_cF7dcv3bvfloA:9 a=QEXdDO2ut3YA:10 a=iS4WXqH-_IHI08BRIDHb:22 a=LFmTWDQwI0-otKWpGkAp:22
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codalogic.com; s=default; t=1705412804; bh=/0EuIH5CgFCfoqbxSG3Nnwm/sOrC1bCcfBFQaJXvNdI=; h=Received:Received:To:From:Subject; b=fqlePbHbvK3w3/uPlj5eeBwX/+VcSJs326joir51zL+XFwe3JQCj1D40Et4xeoldv vx7wox5TAdEHxJcfVyzELRaVpm+bZEhzKlv5xFojKv8y5C/OEotVIOo2WiUxFSpaBq VijcF+oqdg0WwAzjpv1U4gDJI6pM3eYrIfIkuDWY=
Received: (qmail 5670 invoked from network); 16 Jan 2024 13:46:44 +0000
Authentication-Results: 31.28.205.92.host.secureserver.net; spf=pass (sender IP is 86.181.217.85) smtp.mailfrom=petejson@codalogic.com smtp.helo=[192.168.1.72]
Received-SPF: pass (31.28.205.92.host.secureserver.net: connection is authenticated)
Received: from host86-181-217-85.range86-181.btcentralplus.com (HELO ?192.168.1.72?) (86.181.217.85) by 31.28.205.92.host.secureserver.net with ESMTPSA (AES128-GCM-SHA256 encrypted, authenticated); 16 Jan 2024 13:46:44 +0000
Message-ID: <87527a42-aaac-4f39-b320-05f18a2808c1@codalogic.com>
Date: Tue, 16 Jan 2024 13:46:43 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
To: "json@ietf.org" <json@ietf.org>
From: Pete Cordell <petejson@codalogic.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfKq/GeZznd0QsT4+OTT7xAsCMBRHzylymlonc6nc7x/003eNw2zGwqWJMTcuqTwvO2U20S7V6RIL3SnWbz7zZ4jUOGrMGdMerXvf1M8ejUDrpANTFXi9 ixocoQv3U/9f9GyojS0QjIjHFqsbI/OBd9Z08e8Xl6EFZyK66OeYxCK7TUX6IuU6Uc3sJerL4jcJVg==
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/yjWIy9LxSsX6P27j4knZdda8yiE>
Subject: [Json] JSON and int64s - any change in current best practice since I-JSON
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.39
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: <https://mailarchive.ietf.org/arch/browse/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, 16 Jan 2024 13:47:52 -0000

Hi All,

In I-JSON it recommends encoding 64-bit values using a string because 
many parsers (in particular browsers) always represent numbers using 
floating point doubles.

We're over 8 years on from I-JSON and browsers now support things like 
BigInt.

Therefore, I'd be interested to hear if there is any community change of 
opinion on how 64-bit ints should be handled in JSON.

Thanks,

Pete.
-- 
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
C++ tools for C++ programmers, http://codalogic.com
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------