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

Joe Hildebrand <hildjj@cursive.net> Wed, 17 January 2024 17:02 UTC

Return-Path: <hildjj@cursive.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 96FAEC14CE27 for <json@ietfa.amsl.com>; Wed, 17 Jan 2024 09:02:20 -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_DNSWL_NONE=-0.0001, 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=cursive.net
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 m-BNFrah8qDm for <json@ietfa.amsl.com>; Wed, 17 Jan 2024 09:02:16 -0800 (PST)
Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ACD08C151552 for <json@ietf.org>; Wed, 17 Jan 2024 09:00:43 -0800 (PST)
Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-783293278adso673234585a.3 for <json@ietf.org>; Wed, 17 Jan 2024 09:00:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cursive.net; s=google; t=1705510843; x=1706115643; darn=ietf.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bguQMuiqONg2ZiRRX6/bJfOanEbG6n/pMkjjEcmIG0w=; b=De5Ntl+/jFbH361hU2f3MKehbLID3bQvFlMyPmvICYvSAdco0pVbgb/G1UVbbfCsnj edDZqQsTAaoWBvkBg9imx1h8SfBGabD1+7WrmbL7bPn3VGvRZsFicGx53LHOnB40TUGe uXLa7JETLFcipLu+D1XF/LLWiq4XyZihzOWJM=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705510843; x=1706115643; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bguQMuiqONg2ZiRRX6/bJfOanEbG6n/pMkjjEcmIG0w=; b=muuMD5R8d9nt0IMY1WmuO5iHg3R4puUqy68KuoUwlImSvnvAmRCiPipakGQHQXS694 DAkVcri5A3KqZ4eKhSFns1nWiJ6JjaDLFe71VWagfoVL/YfdaYffcgQ3Y0KPednkPZQp Yc6Sw+OxB8IhjT/TQeLk+cuFA3WypCfeV6VspidFLDr1uOj/4NlAUgbEAPlur0isMUlP gsuut1uism8vTcN2Rt5ruX9kJMFswICtmuDm2DF6NYTMG3UiqCTWPKOIFEGSejeTlLxn ml9BwSlhtRtVmiF+nyvvn2sqWDfLT4W2fY9GgVez5RoJ+T2ZIOC4fGCI6JTmX3ThmJw9 cwZQ==
X-Gm-Message-State: AOJu0YwJZ2I9upJLVZ5rIearoI7qKGlMCKidW/qZgCnfFCz/4wZU8IbX 8WaIzTbdFx5fu8ZJltO9y1ucuGlSKgOY9AL3Q4CaQ1JDFw==
X-Google-Smtp-Source: AGHT+IEdnzgXGGAuaX4fXuhmDYfR6caezk6GbAGFv/IpPNAbIG3aXWqALno2iDjME+CQattH0+Lckw==
X-Received: by 2002:a05:6214:20c7:b0:681:6c3b:a5a6 with SMTP id 7-20020a05621420c700b006816c3ba5a6mr3836165qve.10.1705510842649; Wed, 17 Jan 2024 09:00:42 -0800 (PST)
Received: from smtpclient.apple (pool-71-163-33-223.washdc.fios.verizon.net. [71.163.33.223]) by smtp.gmail.com with ESMTPSA id f25-20020ad45599000000b006817878829esm973872qvx.26.2024.01.17.09.00.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2024 09:00:42 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\))
From: Joe Hildebrand <hildjj@cursive.net>
In-Reply-To: <994E2C0A-4AE0-4720-8C67-913BBF033E11@tzi.org>
Date: Wed, 17 Jan 2024 12:00:31 -0500
Cc: Pete Cordell <petejson@codalogic.com>, "json@ietf.org" <json@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <0BB09B30-B606-44CC-85DC-95A47E485316@cursive.net>
References: <87527a42-aaac-4f39-b320-05f18a2808c1@codalogic.com> <C31BF4C8-9E6C-48F8-BF7B-D2C379273B3F@tzi.org> <CAHBU6it4SaLawSiBgK9ySkbxjtHE6CX-P3r=hzcVy4ksoQo-Cg@mail.gmail.com> <CAChr6SxHfLW-A1asAndKJz-AiyJv5QP18bi=_bNdKXw7zYHThw@mail.gmail.com> <CAChr6SweYdCWxSABZ7g20Zd-xBFzcK0Ritq53S7WtjSwc-vLmw@mail.gmail.com> <E5A68370-CC2F-4618-AB39-39A382656616@cursive.net> <807fea1b-a22b-4d6b-aa5d-720c9b12023c@codalogic.com> <09233A73-3A6B-4E6F-AEB8-596AC6442E24@cursive.net> <869950DC-647B-4481-AEF8-9E092384E99F@tzi.org> <CBD32B58-8328-4602-89C6-BC2A7A875A0D@cursive.net> <994E2C0A-4AE0-4720-8C67-913BBF033E11@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3774.300.61.1.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/0sP4VgQA-u7kWdcmPGqXeCLTJ7c>
Subject: Re: [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: Wed, 17 Jan 2024 17:02:20 -0000

> On Jan 17, 2024, at 11:54 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Understand now.
> I’m wondering why CBOR EDN couldn’t fit the bill...

Perhaps.  I'm still not a fan of parsing CBOR diagnostic notation, and EDN has features around encoding size that would be actively harmful a text-based interchange format, IMO.

>> I'm not sure why other platforms couldn't parse this:
>> 
>> ```eson
>> [
>> // Always generates a bigint
>> 1n,
>> ]
>> ```
>> 
>> into a single element array containing their local bigint type?
> 
> What *is* a “local bigint type” in Rust?  Ruby?  Erlang?

Presumably they could use an int64 and fail for larger numbers, or they could use a library (e.g. https://docs.rs/num/latest/num/struct.BigInt.html, Ruby Bignum).  What do those languages do for CBOR tags 2 and 3?

— 
Joe Hildebrand