[Cbor] Map keys?

Felipe Gasper <felipe@felipegasper.com> Mon, 29 April 2019 13:39 UTC

Return-Path: <felipe@felipegasper.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 EA201120319 for <cbor@ietfa.amsl.com>; Mon, 29 Apr 2019 06:39:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=felipegasper.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 MbDSYDPjAzbO for <cbor@ietfa.amsl.com>; Mon, 29 Apr 2019 06:39:16 -0700 (PDT)
Received: from web1.siteocity.com (web1.siteocity.com [67.227.147.204]) (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 4D114120306 for <cbor@ietf.org>; Mon, 29 Apr 2019 06:39:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=felipegasper.com; s=default; h=To:Message-Id:Subject:Date:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uE+KT6ODSvQaIjjnvPYF83dibhiFsfWkiPG63C0aywY=; b=k/g+b+BbqN9Ab6LQe5pdUlwKzP fIvIF49G4EdLNGlxTMIxAhf7Gf9arYJTyeSfSecD7vyyv+DMXWGxaMKBmea/p4rlma/fQp5M2+t3k vWgerTkHoh6Gg74E41zxsTyR7Yyj3D7bAmruH+uUYBfSLbfMGRMkwmiWbhCT16ty4ZfsnqtKCn8Nv snsZz9VWBdQpGaepvyfUo3W2ssLL2zbPgZw+ZxYFffZZe01eNRKkfEiCeMVSrNj5fJwCysgXNlDZO e60Xm5MmBveHksJ1w46qsKB7ZI41FgoGRcDymuyc4Q5IQ2OY0kgHcSCivqjEAK5ZQgS7eSLcdMvyO 8RS43Azw==;
Received: from [208.54.80.144] (port=18225 helo=[22.34.232.198]) by web1.siteocity.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from <felipe@felipegasper.com>) id 1hL6Ux-000aVh-KM for cbor@ietf.org; Mon, 29 Apr 2019 08:39:12 -0500
From: Felipe Gasper <felipe@felipegasper.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-6145A81E-B445-4328-8AAA-C4469AC229CF"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Mon, 29 Apr 2019 09:39:10 -0400
Message-Id: <8269CD1C-B024-4961-A889-C8543502596A@felipegasper.com>
To: cbor@ietf.org
X-Mailer: iPhone Mail (16D57)
X-OutGoing-Spam-Status: No, score=-1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - web1.siteocity.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - felipegasper.com
X-Get-Message-Sender-Via: web1.siteocity.com: authenticated_id: fgasper/from_h
X-Authenticated-Sender: web1.siteocity.com: felipe@felipegasper.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-From-Rewrite: unmodified, already matched
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/MjnTq7QuvsMDzQ723gMhCBUuvJU>
Subject: [Cbor] Map keys?
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, 29 Apr 2019 13:39:21 -0000

Hello,

I’m looking at RFC 8392, which says:

——-
In JSON, maps are called objects and only have one kind of map key: a string. CBOR uses strings, negative integers, and unsigned integers as map keys. The integers are used for compactness of encoding and easy comparison. The inclusion of strings allows for an additional range of short encoded values to be used.
——-

While this doesn’t directly say per se that CBOR _only_ uses strings and integers as map keys, the implication seems strong. I don’t see any such limitation in the CBOR RFC.

Does CBOR intend, then, to restrict map keys to only major types 0, 1, and 3?

Thank you!

-Felipe