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

Joe Hildebrand <> Mon, 15 March 2021 18:50 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 490513A1AD0 for <>; Mon, 15 Mar 2021 11:50:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.697
X-Spam-Status: No, score=-1.697 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: (amavisd-new); dkim=neutral reason="invalid (public key: not available)"
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id gBlWT4EYRM-p for <>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6046E3A1ACF for <>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
Received: by with SMTP id w125so6934044oib.13 for <>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OpktNTXqCyt+KNDPxccMMesbkog6eTbqPEVqJ5MuCS4=; b=jIgHkCn0PXk8+nXZ1aP4RmIWpv6Mp6KvHHx/SLS4yicCkkRwkRtVhxrbhcMdViaEmn 9umTohGbqEQjVjkRG3qecIolncEd1iWylGfRjlpoku5V5qWmqmSm6CjCB1Cohnu7TdL5 L7xgDtteOCMueFiSsuT+Bo4sQ5Ppu/PjqHHwI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OpktNTXqCyt+KNDPxccMMesbkog6eTbqPEVqJ5MuCS4=; b=sk2BcJrPImsCHDtdHmySN1F8NZ2opgFEav3PAItnx1Lb6mB2MI/YdQS6gqxga9t7H3 DZP94v8F5yz4Xn5mXynAhOvHW9DqWZa3penDAByQgX9XX9QjREgCc9pQJrmfkNBmCzR1 Hp4KDRtDsWbMh1t8OnrX2Mbz3BnGbvt2YPb0oyGTN+z0QcyvrCkM/v4V3X1zvAZ6a4LT yII7y68GA7YVAlVhcwS3nhN0/3doIpwu5FtByzh5uEgqY2MMNc5AWTfmuybLFBk8J8zv 8Db9+3fg7y5Vpw97FBWwdVvbBc5c7bnlF9zXs1Gqv8Co0GGZas7mSLyk7NEEZ5MpdSzv y+Lw==
X-Gm-Message-State: AOAM5315RLXPdieym71IzCFLcIr8E2wrIPS20dQf4q1yPdecNUepzaNT NqqTNQvzzeoIxfR4bDX+EJNfYIK4W8TY5w==
X-Google-Smtp-Source: ABdhPJxMO2/JhDZnoGNVsjG9naBYw2413um85mGLVX8x7WlBIwRvP3qJhBvyvAshUn51VbZ9/ccLuw==
X-Received: by 2002:aca:3456:: with SMTP id b83mr373460oia.51.1615834203678; Mon, 15 Mar 2021 11:50:03 -0700 (PDT)
Received: from ?IPv6:2601:282:200:3758:b10e:3847:34b3:46d6? ([2601:282:200:3758:b10e:3847:34b3:46d6]) by with ESMTPSA id 8sm7488549otx.1.2021. (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Mar 2021 11:50:03 -0700 (PDT)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.\))
From: Joe Hildebrand <>
In-Reply-To: <>
Date: Mon, 15 Mar 2021 12:50:02 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <>
To: Emile Cormier <>
X-Mailer: Apple Mail (2.3654.
Archived-At: <>
Subject: Re: [Cbor] Consolidated set of tags for map-like entities
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 15 Mar 2021 18:50:06 -0000

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 <> 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:
> 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