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

Laurence Lundblade <lgl@island-resort.com> Thu, 18 February 2021 16:48 UTC

Return-Path: <lgl@island-resort.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 773CA3A1437 for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 08:48:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 n_q8qcusPUam for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 08:48:26 -0800 (PST)
Received: from p3plsmtpa06-03.prod.phx3.secureserver.net (p3plsmtpa06-03.prod.phx3.secureserver.net [173.201.192.104]) (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 4FFC73A1434 for <cbor@ietf.org>; Thu, 18 Feb 2021 08:48:26 -0800 (PST)
Received: from laurences-mbp.gateway.2wire.net ([187.223.244.101]) by :SMTPAUTH: with ESMTPSA id CmTVlLEqn4OvsCmTXlxjWw; Thu, 18 Feb 2021 09:48:24 -0700
X-CMAE-Analysis: v=2.4 cv=TI6A93pa c=1 sm=1 tr=0 ts=602e9a58 a=4DuQCvq92BI7+Z+mmVs66w==:117 a=4DuQCvq92BI7+Z+mmVs66w==:17 a=4tOVxll6AAAA:8 a=iClJuljEAAAA:8 a=gKmFwSsBAAAA:8 a=oInWBxBFAAAA:20 a=48vgC7mUAAAA:8 a=XV5Q2P16UxFeiS-RDVYA:9 a=QEXdDO2ut3YA:10 a=U48HNHzlxMxMlQfYe7MA:9 a=HVSmfq3b-Ayekmxa:21 a=_W_S_7VecoQA:10 a=DYY0s9dCeKRJPMT8920N:22 a=xTxTf6f5l9QqXJC2ITn9:22 a=nnPW6aIcBuj1ljLj_o6Q:22 a=w1C3t2QeGrPiZgrLijVG:22
X-SECURESERVER-ACCT: lgl@island-resort.com
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <72053102-1BA1-4281-9F17-CF7A65EEA907@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_D65FD9E8-4B1C-4C46-989A-8909A9D02986"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\))
Date: Thu, 18 Feb 2021 09:48:21 -0700
In-Reply-To: <94bbc990fcf388ae5fd01c06274ed58a@mothers-arms.co.uk>
Cc: Joe Hildebrand <hildjj@cursive.net>, cbor@ietf.org, Carsten Bormann <cabo@tzi.org>, "Dale R. Worley" <worley@ariadne.com>
To: Kio Smallwood <kio@mothers-arms.co.uk>
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>
X-Mailer: Apple Mail (2.3608.120.23.2.1)
X-CMAE-Envelope: MS4xfK1UO4vZpNcm3MD3hlJ1CKttlTyhL7odMcVPuTCN6J2zvlmFfPIRnx+24aCO1BhiZEWvJs9TOD39UFbPfuz7kJGSzebP9UfwqjTPvLtpR7rXub3lVjIJ KZ7/qhaSVMjL9vVRHCvmMjMFl/zniG+bgurE/1qBEKUIQFBgF884VH5SUSBcfgXfltTXCqAuhRi/z0/vRFi5duHImvGKU8KwU2dM9fM/sHtUwmGZ48IbpG0x fPitNLc8Ory16iVES7X22m8LmlQs+S+i/dPqJ2k69ijo3c6/5qmRWNPF3pVNIQ9/fbpl3pgUopoABD24VKHOKt/6NDYFXRDvRg8YYaT6HAw=
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/bF3FrsvCuFrPMjSFsABBAARC2Ao>
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 16:48:29 -0000

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. 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?

- Don’t standardize any IETF protocols that use exotic map keys?
- Add text to Kio’s proposal to restrict map keys to text string, byte string and integer?
- Write some warning against this somewhere?

LL



> On Feb 18, 2021, at 9:15 AM, Kio Smallwood <kio@mothers-arms.co.uk> wrote:
> 
> Thanks Joe!
> 
> I really appreciate the additional input since I wasn't aware of other languages with a similar datatype.
> 
> I've accepted your PR and updated my README and repo commentary to reflect the TBD status of the tag.
> 
> Cheers,
> 
> Kio
> 
> On 2021-02-18 15:19, Joe Hildebrand wrote:
> 
>> PR's sent for both your repo and mine.
>> 
>> — 
>> Joe Hildebrand
>> 
>>> On Feb 18, 2021, at 8:00 AM, Joe Hildebrand <hildjj@cursive.net <mailto:hildjj@cursive.net>> wrote:
>>> 
>>> Kio, I'm happy to defer to your document, since you published first.  Sorry I didn't know about it.  If you are amenable, I'll replace my doc with a pointer to yours, and send you a PR with some suggestions for JS examples.
>>> 
>>> — 
>>> Joe Hildebrand
>>> 
>>>> On Feb 18, 2021, at 7:42 AM, Kio Smallwood <kio@mothers-arms.co.uk <mailto:kio@mothers-arms.co.uk>> wrote:
>>>> 
>>>> I'll modify it to remove the claim until it moves further.
>>>> 
>>>> I definitely want to avoid confusion!
>>>> 
>>>> Kio
>>>> 
>>>> On 18 February 2021 14:15:39 GMT, Carsten Bormann <cabo@tzi.org <mailto:cabo@tzi.org>> wrote:
>>>> 
>>>> 
>>>> On 2021-02-18, at 14:57, Kio Smallwood <kio@mothers-arms.co.uk <mailto:kio@mothers-arms.co.uk>> wrote:
>>>> 
>>>> Hi Dale,
>>>> 
>>>> I have made a similar proposal here: https://github.com/Sekenre/cbor-ordered-map-spec/blob/master/CBOR_Ordered_Map.md <https://github.com/Sekenre/cbor-ordered-map-spec/blob/master/CBOR_Ordered_Map.md>
>>>> 
>>>> ... and here we see the danger of just "claiming" a number...
>>>> 
>>>> (272 is Non-UTF-8 CESU-8 string).
>>>> 
>>>> I've tried to explain the rationale that it is adding a straightforward option for serializing a native data-type in Python 3 and other languages that support order-preserving key-value maps.
>>>> 
>>>> Yes.  And I agree with Dale that we should look a bit closer, but that is not a reason not to allocate a tag.
>>>> 
>>>> Grüße, Carsten
>>>> CBOR mailing list
>>>> CBOR@ietf.org <mailto:CBOR@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/cbor <https://www.ietf.org/mailman/listinfo/cbor>
>>>> 
>>>> -- 
>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>>> _______________________________________________
>>>> CBOR mailing list
>>>> CBOR@ietf.org <mailto:CBOR@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/cbor <https://www.ietf.org/mailman/listinfo/cbor>
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor