Re: [Cbor] [Json] Update Standard to support ECMA-262 BigInt

Carsten Bormann <cabo@tzi.org> Wed, 05 May 2021 04:56 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 67CEF3A0AD8; Tue, 4 May 2021 21:56:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.219
X-Spam-Level:
X-Spam-Status: No, score=-4.219 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BCDmC_nGWixP; Tue, 4 May 2021 21:56:32 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C70643A0AD7; Tue, 4 May 2021 21:56:31 -0700 (PDT)
Received: from smtpclient.apple (p548dcb12.dip0.t-ipconnect.de [84.141.203.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4FZkvD4qHSz105p; Wed, 5 May 2021 06:56:24 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <f1e29330-f71a-ee0c-5b9e-77b262d46905@codalogic.com>
Date: Wed, 5 May 2021 06:56:19 +0200
Cc: cbor@ietf.org, Daniel P <danielaparker@gmail.com>, JSON WG <json@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <DF6D8582-2028-4E16-853E-FA9BB25F151B@tzi.org>
References: <CA+mwktLWwDRYtF9BFSRnF4e7_v=e3F4HERS5yHptSksxGBysnQ@mail.gmail.com> <F1A006F9-8743-4930-B879-F83339A38485@tzi.org> <9e811395-2f56-f2b2-b4a6-c686544cb1ef@codalogic.com> <DC77FE0A-E0E1-4A92-AD7D-4522E450BED4@tzi.org> <9771fc21-0193-1338-a128-fb9bdf00db66@codalogic.com> <881D79CF-3CA2-46B4-8D9C-CC0D3D817403@tzi.org> <f1e29330-f71a-ee0c-5b9e-77b262d46905@codalogic.com>
To: Pete Cordell <petejson@codalogic.com>
X-Mailer: Apple Mail (2.3654.80.0.2.43)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/E8QBmmeotqUodKcpcHCQDO0wRbQ>
Subject: Re: [Cbor] [Json] Update Standard to support ECMA-262 BigInt
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 May 2021 04:56:37 -0000

Ah, I missed this point:

> On 4. May 2021, at 18:56, Pete Cordell <petejson@codalogic.com> wrote:
> 
>   rfc3339 = <<ABNFEND
>      date-fullyear   = 4DIGIT
>      date-month      = 2DIGIT  ; 01-12
> […]
>      date-time       = full-date "T" full-time
>   ABNFEND .cat rfc5234-core
> 
>   rfc5234-core = <<ABNFEND
>      DIGIT          =  %x30-39 ; 0-9
>      ; abbreviated here
>   ABNFEND
> 
> (I think HEREDOCs would normally end when only the end token appears on its own line, but CDDL could say it has to be the first token on the line ad other tokens could follow so you can get your .cat rfc5234-core in.)

Using classical HEREDOC syntax, this would actually be:

>   rfc3339 = <<ABNFEND .cat rfc5234-core
>      date-fullyear   = 4DIGIT
>      date-month      = 2DIGIT  ; 01-12
> […]
>      date-time       = full-date "T" full-time
>   ABNFEND

…which is maybe the best reason why one might want to prefer HEREDOCs over strings (or not!).

Grüße, Carsten