Re: [Cbor] Map keys?

Jim Schaad <ietf@augustcellars.com> Mon, 29 April 2019 15:49 UTC

Return-Path: <ietf@augustcellars.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 73B4D120086 for <cbor@ietfa.amsl.com>; Mon, 29 Apr 2019 08:49:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 9zah3uS2_0cy for <cbor@ietfa.amsl.com>; Mon, 29 Apr 2019 08:49:13 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DC76E12004E for <cbor@ietf.org>; Mon, 29 Apr 2019 08:49:12 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 29 Apr 2019 08:49:05 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Felipe Gasper' <felipe@felipegasper.com>, <cbor@ietf.org>
References: <8269CD1C-B024-4961-A889-C8543502596A@felipegasper.com>
In-Reply-To: <8269CD1C-B024-4961-A889-C8543502596A@felipegasper.com>
Date: Mon, 29 Apr 2019 08:49:04 -0700
Message-ID: <003b01d4fea3$14012250$3c0366f0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_003C_01D4FE68.67A41F10"
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQFGBkt4cHgMpYZBnw/w3mkQotkUJqdxOVYQ
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/x7r5eDf_rT-aRNZ2B4SQ8qUCyUU>
Subject: Re: [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 15:49:16 -0000

Please file an errata on this.  The text should be “In JSON,…  CWT uses strings,…”  The document is talking about what CWT uses for keys and not what CBOR is using for keys.

 

Jim

 

 

From: CBOR <cbor-bounces@ietf.org>; On Behalf Of Felipe Gasper
Sent: Monday, April 29, 2019 6:39 AM
To: cbor@ietf.org
Subject: [Cbor] Map keys?

 

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