Re: [Cbor] A CBOR tag for alternatives/unions, request for comments

Emile Cormier <emile.cormier.jr@gmail.com> Wed, 23 February 2022 14:35 UTC

Return-Path: <emile.cormier.jr@gmail.com>
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 53D223A0F41 for <cbor@ietfa.amsl.com>; Wed, 23 Feb 2022 06:35:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.097
X-Spam-Level:
X-Spam-Status: No, score=-7.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 ft07zY5VMTTY for <cbor@ietfa.amsl.com>; Wed, 23 Feb 2022 06:35:03 -0800 (PST)
Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA6903A0EF8 for <cbor@ietf.org>; Wed, 23 Feb 2022 06:35:02 -0800 (PST)
Received: by mail-yb1-xb2b.google.com with SMTP id j2so48581694ybu.0 for <cbor@ietf.org>; Wed, 23 Feb 2022 06:35:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4ClvDh0jmn6xkt+lC0HoqE+OjjsWHK0Sn6MLkHvVfoo=; b=IIPt9XPxjP54NY4sOLGhMSrdUe9BoCmY8tXi2/wB+8J2BwixyVdApB1lHCIBaSkP0r NYvvi4H6feVaZibC+1h+SCFyrXH7/BsqKFTTFpQL8wtRCND55siZkm7asfOZHRNV3EtQ LCDHAWR/GoAYMW6eKKd2bjQonPZqOkx9Rhj2eFM75XjwQ2WHl2jkVhAIDVQ9aeOnLks1 MnsNUQZhxefPTs+8yAf1rdXRMftYnXgR71LWkD8QVhByKhH1NyIARCPmslVU7+wlApKC MS9PQv/PCzqLQD2ONIm0YeDpa+irBJt3ulVejfL62QZgZc1RHOolhRFdlKy6YhxC6ON4 xj+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4ClvDh0jmn6xkt+lC0HoqE+OjjsWHK0Sn6MLkHvVfoo=; b=SOwFB+3BqbDwGEdnVAUXSrHBJy4UEcnI01QRvqGz3WeJq/S1aQfSeuJiDTzqzRvhjl 7Gt+Vxf9J9EMP/ExDwfuL2FtB6zs1Jd2xRv3wRkk+/dYIOG3c+u4Bv6RPqqUhiUldouZ THouWTAcfM9DnD6gqZpMtDwbuGBk52Vh+WVfE4zs3T8GO8twVW0RnIvjZ5gjfzwqzlpN Ak4N35wxIUMUKEl+toE6LcvrxZzFXltR6uOYXNblgacz/KKDXBEJ14/OBYqf+r37w0Vj TurRW5JMXGQsZUJke2DLKX1GidYKF3/6ZIi3GRXfxqDBtKM9x3XpFFsuHoMYolApDgpA fx5Q==
X-Gm-Message-State: AOAM530iS+5nhl8Y1DqLkGEjikl/ejLujPAUrSij/plyEmQJa1H3AlMo aURFDJFTQVoP++D14Fzf9O+jrVDL/zUoci3gddw=
X-Google-Smtp-Source: ABdhPJyvlTsmvgOntWsdFPi3SfvNCgrqMt1Prxq3DvaIjezGH7PPNxDVY3vFzfnxXPhrA9FZcKFhced0ygoAXLhXbVY=
X-Received: by 2002:a25:c89:0:b0:61d:a1e8:fd14 with SMTP id 131-20020a250c89000000b0061da1e8fd14mr44561ybm.322.1645626901341; Wed, 23 Feb 2022 06:35:01 -0800 (PST)
MIME-Version: 1.0
References: <9300a81abc33a45a9f3c7c1c62da88908280e54a.camel@well-typed.com> <1D3EF118-0223-43BC-81B2-369D4515DB21@tzi.org> <1ce2c092d3214d5fdce59435fc10b084c1ba48ca.camel@well-typed.com> <DFCBE61C-35B2-42A2-8D1A-A633CF939154@tzi.org> <2e10456c5791a422bf7218e7b84051f2b7121b66.camel@well-typed.com> <CAKoRMYGcwrhVWd-J3dX75WZfc+T_oyb6NCUNaeCXMW5_-VYdTw@mail.gmail.com> <52EDB93C-827A-465F-B644-51B3EF590D06@tzi.org> <C9D895BB-40E6-431F-958F-AC031DE4FB58@tzi.org> <CAKoRMYG9X0JF4ehkMc30_UNi0JtT2YMeG4RgxznS6O3Di6pkRA@mail.gmail.com> <CAKoRMYHwewaYxkX=CsfETBbdV7c9U97jfbd9xg=PyrMX5vJhnA@mail.gmail.com> <3B3B7EF0-152B-4015-8485-B204F7AEFFBC@tzi.org> <CAKoRMYFbEG=TkuZPPOiXv2DjEh23Ujd_Q44kQqiWPGc_0GMTuQ@mail.gmail.com> <CAKoRMYHnF6fGJp1dTrJnRHFTBOhreLRwzR_=cCckW1nBXOEz0A@mail.gmail.com> <E8A9E016-2248-4BB9-9864-C6C7D52A4AE5@tzi.org> <CAKoRMYE+gmWyCL9zYDa-O-c3KV_iuzgYuS+Q4fi=U7VHDNDtkQ@mail.gmail.com> <CAKoRMYFdAr1YY3mtmY0NU5X9Bk8_4WYh7bC0CtXpZc3toLSu8g@mail.gmail.com> <7FA54553-5421-4C45-B7DD-E9B2D379F46F@tzi.org> <CAKoRMYH3MTMi_tX5KHF-O-DTKzopiGqe3fi6XjkPaGCM4823OQ@mail.gmail.com> <7dfd62ccb6c089af90c90f26a8945f23232ecbc1.camel@well-typed.com> <CAKoRMYEOo1Gqfc4W4k3NOLKpFa97Q9YzLCm3r0PJ13V2HJPf3A@mail.gmail.com> <2BBF6463-FDB2-4A8A-B20D-7A1AD976A90D@tzi.org> <CAKoRMYFi8uo2GfHA9s1n+-rMO8Ja9=2qMMzjS9Z=F9r3LFozRQ@mail.gmail.com> <8EA89504-C176-4850-9BB8-C7E7206374FF@tzi.org> <CAKoRMYGmOa0hzEFsJh8kpz0bU5x56Yc9P=DBK-ghU83gXxPv7A@mail.gmail.com> <CAKoRMYGUvmxufQUVyvX2mciq5LCmV0Nz-uE2MJn54GDBB+9DRw@mail.gmail.com> <CAKoRMYF_19V6mu4S9GVqfiNzyQVvvOzX6eYwHp_DtZQoG0xTKg@mail.gmail.com> <4B47F4D7-ADE3-4A22-8A5B-97F4E5FCD933@tzi.org>
In-Reply-To: <4B47F4D7-ADE3-4A22-8A5B-97F4E5FCD933@tzi.org>
From: Emile Cormier <emile.cormier.jr@gmail.com>
Date: Wed, 23 Feb 2022 10:34:50 -0400
Message-ID: <CAM70yxACa4ZgOojHLMRv+9Bpuv7dPFtupm+tnrnDZC_i_Dsr8g@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Michael Peyton Jones <michael.peyton-jones@iohk.io>, Duncan Coutts <duncan@well-typed.com>, cbor@ietf.org, Jared Corduan <jared.corduan@iohk.io>, Alexander Byaly <alexander.byaly@iohk.io>
Content-Type: multipart/alternative; boundary="000000000000e32b6405d8b05eae"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/Yxuz0c1kh3C4rctSJoGJCOOljiQ>
Subject: Re: [Cbor] A CBOR tag for alternatives/unions, request for comments
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, 23 Feb 2022 14:35:09 -0000

Is there any consideration into how such tags and their associated datum be
transcoded to JSON, without loss of information?

On Wed, Feb 23, 2022 at 9:16 AM Carsten Bormann <cabo@tzi.org> wrote:

> I finally got around to integrate the proposal by Duncan Coutts and
> Michael Peyton Jones to allocate tags for enumerated alternative data items
> into notable-tags.
>
>
> https://www.ietf.org/archive/id/draft-bormann-cbor-notable-tags-06.html#name-enumerated-alternative-data
>
> I took the liberty to suggest tag 101 (‘e’) for the extended case.
> I also made the cases non-overlapping, as this simplifies deterministic
> encoding (and interop testing in general).
>
> Current state of tag allocation:
> range  used     %                 free                total
> 0 1+0    12 50.00                   12                   24
> 1 1+1    62 26.72                  170                  232
> 2 1+2    45  0.07                65235                65280
> 3 1+4     3  0.00           4294901757           4294901760
> 4 1+8     2  0.00 18446744069414584318 18446744069414584320
>
> If we have time in the CBOR meeting today (very likely) and you have time
> and comments, we could complete the discussion and ask IANA to register.
>
> Coordinates of the CBOR meeting are below.
> You’ll need an IETF datatracker account to participate; you can do that
> here:
>
> https://datatracker.ietf.org/accounts/create/
>
> I’m out of English words to apologize for my tardy treatment of this
> matter (and for the late notice of the meeting in 100 minutes).
>
> Grüße, Carsten
>
>
> The next CBOR WG Virtual Meeting is this Wednesday, 23 Feb, at 15:00
> UTC.  Information for this meeting is here:
>
> Datatracker:
> https://datatracker.ietf.org/meeting/interim-2022-cbor-04/session/cbor
> Notes: https://notes.ietf.org/notes-ietf-interim-2022-cbor-04-cbor
> Meetecho:
> https://meetings.conf.meetecho.com/interim/?short=9d38d4c9-cf9e-48c3-bc25-97b025698ec0
>
>
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor
>