Subject: [Cbor] CBOR Schema

From: Anders Rundgren <[email-masked]>
Date: Thu, 10 Feb 2022 11:28:30 +0100

Hi List,

Here is another thing to ponder about.

If your desire is to have "CBOR Everywhere",  you may one day have to consider some kind of schema.  I haven't looked into this, but it is possible that https://www.openapis.org/ already have what it takes.

Right, we are obviously not talking about battery powered smoke detectors, but about systems have gigabytes of RAM.  These systems are often using JSON for data interchange.

Cheers,
Anders

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 10 Feb 2022 12:32:51 +0100

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