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

Kio Smallwood <> Mon, 15 March 2021 19:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 468BC3A0A87 for <>; Mon, 15 Mar 2021 12:36:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, KHOP_HELO_FCRDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 00SO8h87LnNT for <>; Mon, 15 Mar 2021 12:36:54 -0700 (PDT)
Received: from ( [IPv6:2001:8b0:62::26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E08E23A09BE for <>; Mon, 15 Mar 2021 12:36:53 -0700 (PDT)
Received: from ([2001:8b0:62::22] by with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <>) id 1lLt1I-0002nf-KV; Mon, 15 Mar 2021 19:36:52 +0000
Received: from ([]) by with HTTP (HTTP/1.1 POST); Mon, 15 Mar 2021 19:36:49 +0000
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_9f071d2974764d67f5c23074322e8050"
Date: Mon, 15 Mar 2021 19:36:49 +0000
From: Kio Smallwood <>
To: Emile Cormier <>
In-Reply-To: <>
References: <>
Message-ID: <>
User-Agent: Roundcube Webmail/1.3.16
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 19:37:03 -0000

Hi Emile, 

Thanks for enumerating all of the possibilities. I have a few thoughts: 

* Would it be worth noting which programming languages and environments
already make use of each type? For example, users of the cbor2 python
library would only see tag 128 (equivalent to major type 5) tag 129,
130, for ordered and multimaps, and 132 when inter-operating with
javascript/json. The rest would be very strange to encounter in a Python

* For the Homogeneous keys/values, should we (codec implementers) assume
that the type of the first key/value encountered in the data item
determines the type of the remainder? 



On 2021-03-12 23:50, 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