Re: [Cbor] correctness of implied top level array?

Carsten Bormann <cabo@tzi.org> Wed, 27 February 2019 16:54 UTC

Return-Path: <cabo@tzi.org>
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 6B8C6131022 for <cbor@ietfa.amsl.com>; Wed, 27 Feb 2019 08:54:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 E_IQwLhMPT4q for <cbor@ietfa.amsl.com>; Wed, 27 Feb 2019 08:54:40 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (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 6FBA1130EED for <cbor@ietf.org>; Wed, 27 Feb 2019 08:54:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [134.102.200.7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id x1RGsUBk019698; Wed, 27 Feb 2019 17:54:35 +0100 (CET)
Received: from [192.168.217.106] (p54A6C2FE.dip0.t-ipconnect.de [84.166.194.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 448hc61Hljz1Bp8; Wed, 27 Feb 2019 17:54:30 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <0A96C82A-85DB-411D-812D-5A3479A8EA87@mozilla.com>
Date: Wed, 27 Feb 2019 17:54:28 +0100
Cc: Laurence Lundblade <lgl@island-resort.com>, cbor@ietf.org
X-Mao-Original-Outgoing-Id: 572979267.16269-99276d8711b6d33d6c73e2774a296449
Content-Transfer-Encoding: quoted-printable
Message-Id: <052FFFD1-6145-4451-91A0-B07ED0AEC726@tzi.org>
References: <81789050-5133-48B0-BEE7-4F1E0BBB4C06@island-resort.com> <40A3B694-80A4-4AD7-A2A6-C071C6E88D2D@tzi.org> <F0A06813-3F1F-4D53-80A1-4CBBBB91DC64@island-resort.com> <0A96C82A-85DB-411D-812D-5A3479A8EA87@mozilla.com>
To: Joe Hildebrand <jhildebrand@mozilla.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/36X1h4KShC_7U5Xzigumw6HprEI>
Subject: Re: [Cbor] correctness of implied top level array?
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: Wed, 27 Feb 2019 16:54:42 -0000

On Feb 27, 2019, at 17:30, Joe Hildebrand <jhildebrand@mozilla.com> wrote:
> 
> However, in my opinion both of the above cases are instances of protocols built on top of CBOR, not inherent in the CBOR design itself.

Indeed, that’s why cbor-seq is a separate document (and a separate media type).

When updating CBOR, we just need to be careful not to rule out decoders that are fine to find additional data when done with the data item they were tasked to decode.  (Both for cbor-seq and for piggy-backing CBOR data in front of a binary blob in some other form.)
It took me a while to add that API to my CBOR implementation…

Grüße, Carsten