Re: [Cbor] Consolidated set of tags for map-like entities

Joe Hildebrand <hildjj@cursive.net> Mon, 15 March 2021 18:50 UTC

Return-Path: <hildjj@cursive.net>
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 490513A1AD0 for <cbor@ietfa.amsl.com>; Mon, 15 Mar 2021 11:50:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.697
X-Spam-Level:
X-Spam-Status: No, score=-1.697 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=cursive.net
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 gBlWT4EYRM-p for <cbor@ietfa.amsl.com>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6046E3A1ACF for <cbor@ietf.org>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
Received: by mail-oi1-x234.google.com with SMTP id w125so6934044oib.13 for <cbor@ietf.org>; Mon, 15 Mar 2021 11:50:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cursive.net; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OpktNTXqCyt+KNDPxccMMesbkog6eTbqPEVqJ5MuCS4=; b=jIgHkCn0PXk8+nXZ1aP4RmIWpv6Mp6KvHHx/SLS4yicCkkRwkRtVhxrbhcMdViaEmn 9umTohGbqEQjVjkRG3qecIolncEd1iWylGfRjlpoku5V5qWmqmSm6CjCB1Cohnu7TdL5 L7xgDtteOCMueFiSsuT+Bo4sQ5Ppu/PjqHHwI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OpktNTXqCyt+KNDPxccMMesbkog6eTbqPEVqJ5MuCS4=; b=sk2BcJrPImsCHDtdHmySN1F8NZ2opgFEav3PAItnx1Lb6mB2MI/YdQS6gqxga9t7H3 DZP94v8F5yz4Xn5mXynAhOvHW9DqWZa3penDAByQgX9XX9QjREgCc9pQJrmfkNBmCzR1 Hp4KDRtDsWbMh1t8OnrX2Mbz3BnGbvt2YPb0oyGTN+z0QcyvrCkM/v4V3X1zvAZ6a4LT yII7y68GA7YVAlVhcwS3nhN0/3doIpwu5FtByzh5uEgqY2MMNc5AWTfmuybLFBk8J8zv 8Db9+3fg7y5Vpw97FBWwdVvbBc5c7bnlF9zXs1Gqv8Co0GGZas7mSLyk7NEEZ5MpdSzv y+Lw==
X-Gm-Message-State: AOAM5315RLXPdieym71IzCFLcIr8E2wrIPS20dQf4q1yPdecNUepzaNT NqqTNQvzzeoIxfR4bDX+EJNfYIK4W8TY5w==
X-Google-Smtp-Source: ABdhPJxMO2/JhDZnoGNVsjG9naBYw2413um85mGLVX8x7WlBIwRvP3qJhBvyvAshUn51VbZ9/ccLuw==
X-Received: by 2002:aca:3456:: with SMTP id b83mr373460oia.51.1615834203678; Mon, 15 Mar 2021 11:50:03 -0700 (PDT)
Received: from ?IPv6:2601:282:200:3758:b10e:3847:34b3:46d6? ([2601:282:200:3758:b10e:3847:34b3:46d6]) by smtp.gmail.com with ESMTPSA id 8sm7488549otx.1.2021.03.15.11.50.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Mar 2021 11:50:03 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
From: Joe Hildebrand <hildjj@cursive.net>
In-Reply-To: <CAM70yxC7o3CNz67Yx3-yLt3tPQaTRaezOO99Ssa-3ppu-NwD=Q@mail.gmail.com>
Date: Mon, 15 Mar 2021 12:50:02 -0600
Cc: cbor@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <C2B0934A-2AAB-4A45-A354-407782B4CA0B@cursive.net>
References: <CAM70yxC7o3CNz67Yx3-yLt3tPQaTRaezOO99Ssa-3ppu-NwD=Q@mail.gmail.com>
To: Emile Cormier <emile.cormier.jr@gmail.com>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/2VodMlwERBGblcDZFlyzTUdvxs0>
Subject: Re: [Cbor] Consolidated set of tags for map-like entities
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, 15 Mar 2021 18:50:06 -0000

Suggestion: make "Unique Keys: no" be a zero bit in the LSB, not 1, for ease of understanding the table.  Alternately, rename to "Allow duplicate keys".

In the "Key/Value Type" section, perhaps use 4 bits, so it's more clear which bits you're talking about?

Data Item being major type 5 should really only be used if the keys are homogeneously strings, in my opinion.

Overall, this feels like somewhat overkill, but solves the problem and I'd be fine with it if it allowed us to move on.

— 
Joe Hildebrand

> On Mar 12, 2021, at 4:50 PM, Emile Cormier <emile.cormier.jr@gmail.com> wrote:
> 
> Hi Everyone,
> 
> I've been corresponding privately with Prof. Bormann about a new tag I proposed for encoding multimaps as arrays or pairs. He's made me aware of your recent discussion about another proposed tag for encoding "ordered" maps, where the insertion order must be preserved. Carsten has indicated to me his desire to consolidate all of these map-related tags together.
> 
> I would like to contribute to this endeavor of consolidating map-related tags. To get the discussion started, I would like to share with you a draft proposal I've written to serve as a starting point: https://github.com/ecorm/cbor-map-like
> 
> Here's a brief summary:
> 
> This document proposes a consolidated set of CBOR tags for map-like entities involving key-value pairs. These tags encode the following meta-data concerning map-like entities:
> 	• the homogeneity of the key and value types,
> 	• the preservation of the insertion order of the key-value pairs,
> 	• the uniqueness of the keys, and,
> 	• the major type used to encode the key-value pairs.
> My interest in CBOR stems from my work on a new C++ serialization library that can support any JSON-like encoding. This library is closed source for now, but I may be able to convince my employer to make it open source in the future.
> 
> I'm also involved with the WAMP protocol, which allows CBOR as one of its encodings.
> 
> I'm looking forward to collaborating with you and I hope that we can come to a solution that satisfies everyone's needs.
> 
> Cheers,
> Emile Cormier
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor