Re: [Cbor] hildjj/cbor-map-entries: Explicit Map datatype for CBOR, in array format Sat, 20 February 2021 03:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 078693A109D for <>; Fri, 19 Feb 2021 19:54:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.983
X-Spam-Status: No, score=-0.983 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4xp1DmaXJgrz for <>; Fri, 19 Feb 2021 19:54:16 -0800 (PST)
Received: from ( [IPv6:2001:558:fe21:29:69:252:207:44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8B1663A109A for <>; Fri, 19 Feb 2021 19:54:16 -0800 (PST)
Received: from ([]) by with ESMTP id DJGXlH2uhp8dBDJLTlnrHB; Sat, 20 Feb 2021 03:54:15 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20180828_2048; t=1613793255; bh=0M2gvnPTho6fkOMW3/OYShAxwH0yfV8bq4QqV+ny4N0=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID; b=S/GfF7gSXmWLVcFdkEiIe5lqO06bBBgEcq20utVj8ktffqSXxk9/XFRulqA9aexcz nvv0zyyKaZwTThzREVAE4+b6wZjfArMotMbsdJlV2o0TkzSmfantFydnOjalb7w8Fi 9BDX2IY4c1rEMUp2NkVVcLQIgNC3hfgn5vqzrOSC8BbI08vXf4d2IGajy/u+Fm6aYP 4QudD1YUlDtkFahSLx5WuVgIeN3gptgnW+9Icaug+pLFcgqcTsbAl6MifAY7iAq4c2 ozhM835BJgpgZeIcLe1UGf38xhyiJ96/g2DULFlOYncVEWl8Gow+6jnlFssutRU1iP rEVn3siPSTWrg==
Received: from ([IPv6:2601:192:4a00:430:222:fbff:fe91:d396]) by with ESMTPA id DJLPlEvLTUuBxDJLQlCiDS; Sat, 20 Feb 2021 03:54:13 +0000
X-Xfinity-VMeta: sc=0.00;st=legit
Received: from ( []) by (8.14.7/8.14.7) with ESMTP id 11K3sAYu002499; Fri, 19 Feb 2021 22:54:10 -0500
Received: (from worley@localhost) by (8.14.7/8.14.7/Submit) id 11K3s8HH002479; Fri, 19 Feb 2021 22:54:08 -0500
X-Authentication-Warning: worley set sender to using -f
From: (Dale R. Worley)
To: Laurence Lundblade <>
In-Reply-To: <> (
Sender: (Dale R. Worley)
Date: Fri, 19 Feb 2021 22:54:08 -0500
Message-ID: <>
Archived-At: <>
Subject: Re: [Cbor] hildjj/cbor-map-entries: Explicit Map datatype for CBOR, in array format
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: Sat, 20 Feb 2021 03:54:19 -0000

My previous message on this was sent at the end of a long day, and I
didn't make my point clearly.

The key idea of the proposed tag is given in the former contents of the that was referenced:

    Although CBOR has support for generic Maps (Major Type 5), some
    implementation languages (such as ECMAScript) have two different
    types they might use to hold the information, depending on whether
    all of the keys are strings or not.  This makes round-tripping
    between CBOR and native representations more difficult, and adds
    complexity in a generic decoder.

This proposal says that there will be two ways of representing maps,
major type 5, and tag 279 plus major type 4.  However, if you read the carefully, it does not assert any difference between what is
allowed to be encoded with them.  That is, it does not state which, if
either, of these representations constrains the key values to be string.
That is, it describes a need but does not provide a solution.

Now I'm pretty sure that what is *intended* is that maps encoded as tag
279 plus major type 4 require the keys to be strings.  Though it's
conceivable that it intends that keys in major type 5 be strings; that
would fix the described problem as well.