[Cbor] Tag 279 "Map entries for CBOR" in array format

worley@ariadne.com Thu, 18 February 2021 03:58 UTC

Return-Path: <worley@alum.mit.edu>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 909B03A1F8F for <cbor@ietfa.amsl.com>; Wed, 17 Feb 2021 19:58:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.982
X-Spam-Status: No, score=-0.982 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=comcastmailservice.net
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id Xk1TM2D5QPpP for <cbor@ietfa.amsl.com>; Wed, 17 Feb 2021 19:58:41 -0800 (PST)
Received: from resqmta-ch2-04v.sys.comcast.net (resqmta-ch2-04v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8E4983A1F97 for <cbor@ietf.org>; Wed, 17 Feb 2021 19:58:39 -0800 (PST)
Received: from resomta-ch2-16v.sys.comcast.net ([]) by resqmta-ch2-04v.sys.comcast.net with ESMTP id CZeXlJx9Vx10yCaScloUi0; Thu, 18 Feb 2021 03:58:38 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1613620718; bh=ipDoCYdtk0Lxwo8Q7PYwafFEbrCHGErml4gTbky5sEA=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID; b=Wt3R1RR/mLOyef3F23kRUrx3qvWIHl2TwHLdQ/RX718Gh0FRcPhGt55Etr0wwlZQM vwkryjPFFrOWFUsWqkuj2FdQOyuLPN4WV6xoxlRWxWoGCBa4RRGQnOBEdTx32KD77M iOf8Y3rK7VgMRYxaMr0/oxNiU6hG1FnP2b6aQQIYNZRxDJjA+VQgs4ELsEXUZL57jd LxaSR5icpcNJvy3EgZuuKjLySSQUKjqKI1Z1yi9zW+uHtWgYnglzT3Ya0+wufsmyoA Kxs/nti+zeeGXk3xyaDO+d7gfSYipNfPRbSa5/YehCxFlGBo2X+TIUwhEb8B0Fbjyh qVgBhjm5o2YDQ==
Received: from hobgoblin.ariadne.com ([IPv6:2601:192:4a00:430:222:fbff:fe91:d396]) by resomta-ch2-16v.sys.comcast.net with ESMTPA id CaSXllfX5n6ymCaSclrtSx; Thu, 18 Feb 2021 03:58:38 +0000
X-Xfinity-VMeta: sc=3.00;st=legit
Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com []) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id 11I3wXnc005764 for <cbor@ietf.org>; Wed, 17 Feb 2021 22:58:33 -0500
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id 11I3wW9F005761; Wed, 17 Feb 2021 22:58:32 -0500
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com (Dale R. Worley)
To: cbor@ietf.org
In-Reply-To: <CA182161-D902-4B9B-9AD7-B3FA20AD47FC@tzi.org> (cabo@tzi.org)
Sender: worley@ariadne.com (Dale R. Worley)
Date: Wed, 17 Feb 2021 22:58:32 -0500
Message-ID: <87tuqakown.fsf@hobgoblin.ariadne.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/trw-04yfz-3fmstrB6HLxqmRWls>
Subject: [Cbor] Tag 279 "Map entries for CBOR" in array format
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: Thu, 18 Feb 2021 03:58:45 -0000

A recent message pointed to:

> https://github.com/hildjj/cbor-map-entries 

I found it an odd read, as I couldn't figure out what the point is.  As
written, it's an alternative way to express maps, as a tag applied to an
array containing keys and values.  But what's the point?

The text starts off with "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."  And it makes sense that's
a problem to be solved.  But this document doesn't solve that, in that
neither tag-279-array nor CBOR map are constrained to have the keys be
strings, so both of them would have to be decoded into a more general
data type/structure.

Maybe I'm not read into CBOR enough to understand what is intended.  But
it seems to me that this document probably intended to specify that the
key values in a type-279-array must be strings.