Re: [Cbor] Consolidated set of tags for map-like entities

Emile Cormier <emile.cormier.jr@gmail.com> Mon, 15 March 2021 19:00 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 A9DE83A1BE0 for <cbor@ietfa.amsl.com>; Mon, 15 Mar 2021 12:00:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.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, 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 VThs4jOWUesF for <cbor@ietfa.amsl.com>; Mon, 15 Mar 2021 12:00:47 -0700 (PDT)
Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 C5B813A1C9E for <cbor@ietf.org>; Mon, 15 Mar 2021 12:00:36 -0700 (PDT)
Received: by mail-pl1-x62e.google.com with SMTP id u18so15749941plc.12 for <cbor@ietf.org>; Mon, 15 Mar 2021 12:00:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dz6OV7tgqoAYMw83Rw+UfUiZmXn4P+19YLzO1AG1DHo=; b=jBo9fuYoFV5js8+RcyNnOJEy2+etoTRM/qflooeg+ryoMox0XmrKELeo0+nU+MgPaX pO1tUvZfoKHBeT/C2JL2CqazV/RQyETTQrFYTC4f1ES8lLOmrpJTMWixT/rgxOPCNv8p ik9vjNyMUIAPAYpLTAUxT8z3ev66nVdHPF5wlX9XCnxgOnWI9LR9BuyBZmwNCUeW3naT s92eNhXpBLMpB7jL2VNIbBrwqyN1uBgW7PtYNzgdP7RgJxtLCr9Mpyw2xTvr/AijF8Rh S2AmlJw0D1+DF4epKOdI+Gjv5mxONk1nw++IaI/w3tSFMmAL3My1Yweqla0kZKuNLvgL 3QOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Dz6OV7tgqoAYMw83Rw+UfUiZmXn4P+19YLzO1AG1DHo=; b=hnF8Gw5s1ZE7gKtDLokcAI6Lhh2Fe+Q98peL5ItXbz8UtGes/Xtolt7qp7V3ws3nde 8FVZHAdUAle7l6NS2WgBjas3CaW1Mdr3+O2R0P2grpLtFq+wFbhkZGeNlkxOhJWaXmrW //j94Lxax7w2ucGV8Ah6VU6U+lE8ewHeek5biLWoCJ8HcaJVkLujtBXdWrGJp/2mXDAe h/6O0d6L/gFI70PLsraRC7xwrfOl5rmawngnv5umzplkNPpUZWCM7dT8ROejIXOtaMGv +4D6VY3JslZyhHySss1+ace6QGfZsZHpDd13LTXqpqyz+ajb9vghEL3Hib7fwZtZHjF0 kl4A==
X-Gm-Message-State: AOAM533pEJBNtPBoh91RlE8IAAisaC9FEil7v9nTTbKVfxVbxOvNyrBD s1skclYCpVwh4mQYwh4hOQQHIEqs1oFYvYbE2Y4=
X-Google-Smtp-Source: ABdhPJwBBEswYlM6g3uQ0Sdepqei89rmdhW+Cp265c/ztQkOgFoHfX4dZ9rAtqGZ/ni/dw6fe7ePD+NAEZ3z1T2iCCM=
X-Received: by 2002:a17:902:ff15:b029:e4:51ae:e1ee with SMTP id f21-20020a170902ff15b02900e451aee1eemr12688374plj.83.1615834834352; Mon, 15 Mar 2021 12:00:34 -0700 (PDT)
MIME-Version: 1.0
References: <CAM70yxC7o3CNz67Yx3-yLt3tPQaTRaezOO99Ssa-3ppu-NwD=Q@mail.gmail.com> <C2B0934A-2AAB-4A45-A354-407782B4CA0B@cursive.net>
In-Reply-To: <C2B0934A-2AAB-4A45-A354-407782B4CA0B@cursive.net>
From: Emile Cormier <emile.cormier.jr@gmail.com>
Date: Mon, 15 Mar 2021 16:00:23 -0300
Message-ID: <CAM70yxCrD37tEUro46_tLpPQZuWKTYFyWOPaModaAJJOa3mBSQ@mail.gmail.com>
To: Joe Hildebrand <hildjj@cursive.net>
Cc: cbor@ietf.org
Content-Type: multipart/alternative; boundary="000000000000513ced05bd97ddb6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/XXYAGMZKnj9SLIc4VkHd9u5a6ts>
Subject: Re: [Cbor] Consolidated set of tags for map-like entities
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: Mon, 15 Mar 2021 19:00:57 -0000

"Unique Keys: no" as zero bit was chosen so that the first tag in the set
is equivalent to no tag at all. Your point about understandability is well
taken and I will change the column heading as you suggested.

I'll expand it to 4 bits in the "Key/Value Type" section as you suggested.
Thanks!

On Mon, Mar 15, 2021 at 3:50 PM Joe Hildebrand <hildjj@cursive.net> wrote:

> Suggestion: make "Unique Keys: no" be a zero bit in the LSB, not 1, for
> ease of understanding the table.  Alternately, rename to "Allow duplicate
> keys".
>
> In the "Key/Value Type" section, perhaps use 4 bits, so it's more clear
> which bits you're talking about?
>
> Data Item being major type 5 should really only be used if the keys are
> homogeneously strings, in my opinion.
>
> Overall, this feels like somewhat overkill, but solves the problem and I'd
> be fine with it if it allowed us to move on.
>
> —
> Joe Hildebrand
>
> > On Mar 12, 2021, at 4:50 PM, Emile Cormier <emile.cormier.jr@gmail.com>
> wrote:
> >
> > Hi Everyone,
> >
> > I've been corresponding privately with Prof. Bormann about a new tag I
> proposed for encoding multimaps as arrays or pairs. He's made me aware of
> your recent discussion about another proposed tag for encoding "ordered"
> maps, where the insertion order must be preserved. Carsten has indicated to
> me his desire to consolidate all of these map-related tags together.
> >
> > I would like to contribute to this endeavor of consolidating map-related
> tags. To get the discussion started, I would like to share with you a draft
> proposal I've written to serve as a starting point:
> https://github.com/ecorm/cbor-map-like
> >
> > Here's a brief summary:
> >
> > This document proposes a consolidated set of CBOR tags for map-like
> entities involving key-value pairs. These tags encode the following
> meta-data concerning map-like entities:
> >       • the homogeneity of the key and value types,
> >       • the preservation of the insertion order of the key-value pairs,
> >       • the uniqueness of the keys, and,
> >       • the major type used to encode the key-value pairs.
> > My interest in CBOR stems from my work on a new C++ serialization
> library that can support any JSON-like encoding. This library is closed
> source for now, but I may be able to convince my employer to make it open
> source in the future.
> >
> > I'm also involved with the WAMP protocol, which allows CBOR as one of
> its encodings.
> >
> > I'm looking forward to collaborating with you and I hope that we can
> come to a solution that satisfies everyone's needs.
> >
> > Cheers,
> > Emile Cormier
> > _______________________________________________
> > CBOR mailing list
> > CBOR@ietf.org
> > https://www.ietf.org/mailman/listinfo/cbor
>
>