Re: [Cbor] CBOR Schema

Carsten Bormann <cabo@tzi.org> Thu, 10 February 2022 11:33 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 C982C3A09D8 for <cbor@ietfa.amsl.com>; Thu, 10 Feb 2022 03:33:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, 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 FJJmGALIxagJ for <cbor@ietfa.amsl.com>; Thu, 10 Feb 2022 03:32:56 -0800 (PST)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B91243A09AF for <cbor@ietf.org>; Thu, 10 Feb 2022 03:32:56 -0800 (PST)
Received: from [192.168.217.118] (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4JvZNz3XxqzDCdK; Thu, 10 Feb 2022 12:32:51 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <2157b82d-0dde-9510-fca4-7b110940fa71@gmail.com>
Date: Thu, 10 Feb 2022 12:32:51 +0100
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 666185571.130378-7ad5becb7a3e317a88446bb69f7f0e19
Content-Transfer-Encoding: quoted-printable
Message-Id: <6410C7ED-6ADC-4576-94DA-0DA2C1DA0CAF@tzi.org>
References: <2157b82d-0dde-9510-fca4-7b110940fa71@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/IbciBCeW85eK_NbKvjXIHTIARIA>
Subject: Re: [Cbor] CBOR Schema
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, 10 Feb 2022 11:33:01 -0000

CBOR has been designed to be independent of any “Schema Language” (learning from the disadvantages that became apparent with the ASN.1 approach).

However, there is one data definition language that has been designed with CBOR and JSON in mind: The Concise Data Definition Language (CDDL), defined in RFC 8610.

CDDL is meant for humans to create (and for computers to consume).  If a language that is optimized for interchange between tools is required, we could simply go ahead and standardardize the CDDL JSON form, currently defined in Section 7 of the CDDL freezer [1].

Note that other "schema languages” are in active use in the IETF, including YANG (RFC 7950/7951/draft-ietf-core-yang-cbor [2]).

Grüße, Carsten

[1]: https://www.ietf.org/archive/id/draft-bormann-cbor-cddl-freezer-09.html#name-alternative-representations
[2]: https://www.ietf.org/archive/id/draft-ietf-core-yang-cbor-18.html