Re: [Cbor] hildjj/cbor-map-entries: Explicit Map datatype for CBOR, in array format

Michael Richardson <mcr+ietf@sandelman.ca> Thu, 18 February 2021 17:43 UTC

Return-Path: <mcr+ietf@sandelman.ca>
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 6D7F63A14C4 for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 09:43:17 -0800 (PST)
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, SPF_HELO_NONE=0.001, 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 bgsJaw8VfIKI for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 09:43:15 -0800 (PST)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 781853A14C1 for <cbor@ietf.org>; Thu, 18 Feb 2021 09:43:15 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 0B738389B8; Thu, 18 Feb 2021 12:47:03 -0500 (EST)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oAFP7MNXy5g9; Thu, 18 Feb 2021 12:47:02 -0500 (EST)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 7952D389B2; Thu, 18 Feb 2021 12:47:02 -0500 (EST)
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 8D0F212F; Thu, 18 Feb 2021 12:43:13 -0500 (EST)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Laurence Lundblade <lgl@island-resort.com>
cc: Kio Smallwood <kio@mothers-arms.co.uk>, Joe Hildebrand <hildjj@cursive.net>, Carsten Bormann <cabo@tzi.org>, "Dale R. Worley" <worley@ariadne.com>, cbor@ietf.org
In-Reply-To: <72053102-1BA1-4281-9F17-CF7A65EEA907@island-resort.com>
References: <87zh02kpf5.fsf@hobgoblin.ariadne.com> <0faeb37c36d5b1f40c37f82e62be1be9@mothers-arms.co.uk> <ED6F6174-2643-4B7F-8ED7-414DD5FD9C39@tzi.org> <F6BDBA57-34F4-46FE-9806-6A227AC214EA@mothers-arms.co.uk> <DC0D444C-3231-4029-B0BB-5EC02863B72A@cursive.net> <999B078D-C4B2-4B04-8487-7ECEFEB953DF@cursive.net> <94bbc990fcf388ae5fd01c06274ed58a@mothers-arms.co.uk> <72053102-1BA1-4281-9F17-CF7A65EEA907@island-resort.com>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Thu, 18 Feb 2021 12:43:13 -0500
Message-ID: <18707.1613670193@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/1tlFid0pG5XbFSqc_O7oxZgB8SU>
Subject: Re: [Cbor] hildjj/cbor-map-entries: Explicit Map datatype 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 17:43:17 -0000

Laurence Lundblade <lgl@island-resort.com> wrote:
    > This is semi-related and maybe something I’m a little confused about.

    > My understanding is that map keys/labels can be anything in CBOR
    > including a map or array.

yes, that's allowed, but probably unwise to write into a CBOR Protocol.

    > This is nye impossible to write general map
    > handling code for — code like lookup up by label and duplicate
    > detection. They will not translate to other map data structures in
    > other languages and serialization formats.

    > Further, this seems like an
    > exotic feature of little practical use (though I’m sure someone could
    > do something very cool and clever with it for entertainment purposes).

    > What to do?

I think that you got it right in QCBOR: you declare what you support, and
that's it.

    > - Don’t standardize any IETF protocols that use exotic map keys?

I would expect that anyone that tried to do this would get pushback.
So, we lead by example.

Such a hard-to-implem,ent protocol would probably be a terrible failure.
We can't really keep people that are intent on shooting their feet from
obtaining some kind of foot canon.

    > - Add text to Kio’s proposal to restrict map keys to text string, byte string
    > and integer?

no, it doesn't belong there.

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide