<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.6 (Ruby 3.2.2) -->
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-cbor-cddl-more-control-03" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.20.0 -->
  <front>
    <title abbrev="CDDL control operators">More Control Operators for CDDL</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-cbor-cddl-more-control-03"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="February" day="26"/>
    <keyword>Concise Data Definition Language</keyword>
    <keyword>Control Operator</keyword>
    <abstract>
      <?line 64?>

<t>The Concise Data Definition Language (CDDL), standardized in RFC 8610,
provides "control operators" as its main language extension point.
RFCs have added to this extension point both in an
application-specific and a more general way.</t>
      <t>The present document defines a number of additional generally
applicable control operators for text conversion (Bytes, Integers,
JSON, Printf-style formatting), operations on text, and deterministic encoding.</t>
      <!--
[^status]

[^status]:  Revision –00 of this WG draft ...
 -->



    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://cbor-wg.github.io/cddl-more-control/"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl-more-control/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Concise Binary Object Representation (CBOR) Maintenance and Extensions Working Group mailing list (<eref target="mailto:cbor@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/cbor/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/cbor/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cbor-wg/cddl-more-control"/>.</t>
    </note>
  </front>
  <middle>
    <?line 81?>

<section anchor="intro">
      <name>Introduction</name>
      <t>The Concise Data Definition Language (CDDL), standardized in <xref target="RFC8610"/>,
provides "control operators" as its main language extension point
(<xref section="3.8" sectionFormat="of" target="RFC8610"/>).
RFCs have added to this extension point both in an
application-specific <xref target="RFC9090"/> and a more general <xref target="RFC9165"/> way.</t>
      <t>The present document defines a number of additional generally
applicable control operators:</t>
      <table anchor="tbl-new">
        <name>New control operators in this document</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Purpose</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.b64u</tt>, <tt>.b64c</tt></td>
            <td align="left">Base64 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64u-sloppy</tt>, <tt>.b64c-sloppy</tt></td>
            <td align="left">(sloppy-tolerant variants of the above)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hex</tt>, <tt>.hexlc</tt>, <tt>.hexuc</tt></td>
            <td align="left">Base16 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b32</tt>, <tt>.h32</tt></td>
            <td align="left">Base32 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b45</tt></td>
            <td align="left">Base45 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.decimal</tt></td>
            <td align="left">Text representation of integer numbers</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.printf</tt></td>
            <td align="left">Printf-formatted text representation of data items</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.json</tt></td>
            <td align="left">Text representation of JSON values</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.join</tt></td>
            <td align="left">Building text from array of components</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cbordet</tt>, <tt>.cborseqdet</tt></td>
            <td align="left">deterministically encoded CBOR data items, CBOR sequences</td>
          </tr>
        </tbody>
      </table>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

<t>Regular expressions mentioned in the text are as defined in <xref target="RFC9485"/>.</t>
        <t>This specification uses terminology from <xref target="RFC8610"/>.
In particular, with respect to control operators, "target" refers to
the left-hand side operand, and "controller" to the right-hand side operand.
"Tool" refers to tools along the lines of that described in <xref section="F" sectionFormat="of" target="RFC8610"/>.
Note also that the data model underlying CDDL provides for text
strings as well as byte strings as two separate types, which are
then collectively referred to as "strings".</t>
      </section>
    </section>
    <section anchor="text-conversion">
      <name>Text Conversion</name>
      <section anchor="byte-strings-base16-hex-base32-base45-base64">
        <name>Byte Strings: Base16 (Hex), Base32, Base45, Base64</name>
        <t>A CDDL model often defines data that are byte strings in essence but
need to be transported in various encoded forms, such as base64 or
hex.
This section defines a number of control operators to model these
conversions.</t>
        <t>The control operators generally are of a form that could be used like
this:</t>
        <sourcecode type="cddl" name="example1.cddl"><![CDATA[
signature-for-json = text .b64u signature
signature = bytes .cbor COSE_Sign1
]]></sourcecode>
        <t>The specification of these control operators is complicated by the
large number of transformations in use.  Inspired by Section <xref target="RFC8949" section="8" sectionFormat="bare"/> of RFC 8949 <xref target="STD94"/>, we use representations defined in <xref target="RFC4648"/> with the following
names:</t>
        <table>
          <name>Control Operators for Text Conversion of byte strings</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.b64u</tt></td>
              <td align="left">Base64URL, no padding</td>
              <td align="left">
                <xref section="5" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64u-sloppy</tt></td>
              <td align="left">Base64URL, no padding, sloppy</td>
              <td align="left">
                <xref section="5" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64c</tt></td>
              <td align="left">Base64 classic, padding</td>
              <td align="left">
                <xref section="4" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64c-sloppy</tt></td>
              <td align="left">Base64 classic, padding, sloppy</td>
              <td align="left">
                <xref section="4" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b32</tt></td>
              <td align="left">Base32, no padding</td>
              <td align="left">
                <xref section="6" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.h32</tt></td>
              <td align="left">Base32/hex alphabet, no padding</td>
              <td align="left">
                <xref section="7" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hex</tt></td>
              <td align="left">Base16 (hex), either case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hexlc</tt></td>
              <td align="left">Base16 (hex), lower case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hexuc</tt></td>
              <td align="left">Base16 (hex), upper case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b45</tt></td>
              <td align="left">Base45</td>
              <td align="left">
                <xref target="RFC9285"/></td>
            </tr>
          </tbody>
        </table>
        <t>Note that this specification is somewhat opinionated here: It does not
provide base64url, base32 or base32hex encoding with padding, or
base64 classic without padding.  Experience indicates that these
combinations only ever occur in error, so the usability of CDDL is
increased by not providing them in the first place.  Also, adding "c"
makes sure that any decision for classic base64 is actively taken.</t>
        <t>The additional designation "sloppy" indicates that the text string is
not validated for any additional bits being zero, in variance to what
is specified in the paragraph behind table 1 in <xref section="4" sectionFormat="of" target="RFC4648"/>.
Note that the present specification is opinionated again in not
specifying a sloppy variant of base32 or base32/hex, as no legacy use
of sloppy base32(/hex) was known at the time of writing.
Base45 is known to be suboptimal for use in environments with limited
data transparency (such as URLs), but is included because of its close
relationship to QR codes and its wide use in health informatics (note
that base45 is at least strongly specified not to allow sloppy forms
of encoding).</t>
      </section>
      <section anchor="numbers">
        <name>Numbers</name>
        <table>
          <name>Control Operator for Text Conversion of Integers</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.decimal</tt></td>
              <td align="left">Decimal Integer</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>The control operator <tt>.decimal</tt> allows the modeling of text strings that carry numeric
information in decimal form, such as in the uint64/int64 formats of
YANG-JSON <xref target="RFC7951"/>.</t>
        <sourcecode type="cddl" name="example2.cddl"><![CDATA[
yang-json-sid = text .decimal (0..9223372036854775807)
]]></sourcecode>
        <t>Again, the specification is opinionated by only providing integer numbers
without leading zeros, i.e., the decimal numbers match the regular
expression <tt>0|-?[1-9][0-9]*</tt> (of course, further restricted by the
control type).
See the next section for more flexibility, and for octal, hexadecimal,
or binary conversions.</t>
      </section>
      <section anchor="printf-style-formatting">
        <name>Printf-style Formatting</name>
        <table>
          <name>Control Operator for Printf-formatting of data item(s)</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.printf</tt></td>
              <td align="left">Printf-formatting of data item(s)</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>The control operator <tt>.printf</tt> allows the modeling of text strings that carry various formatted
information, as long as the format can be represented in Printf-style
formatting strings as they are used in the C language (see Section
7.21.6.1 of <xref target="C"/>).</t>
        <t>The controller (right-hand side) of the <tt>.printf</tt> control is an array
of one Printf-style format string and zero or more data items that fit
the individual conversion specifications in the format string.
The construct matches a text string representing the textual output of
an equivalent C-language <tt>printf</tt> function call that is given the
format string and the data items following it in the array.</t>
        <t>From the printf specification in the C language, length modifiers (paragraph 7)
are not used and <bcp14>MUST NOT</bcp14> be included in the format string.
The 's' conversion specifier (paragraph 8) is used to
interpolate a text string in UTF-8 form.
The 'c' conversion specifier (paragraph 8) represents a single Unicode
scalar value as a UTF-8 character.
The 'p' and 'n' conversion specifiers (paragraph 8) are not used and
<bcp14>MUST NOT</bcp14> be included in the format string.</t>
        <t>In the following example, <tt>my_alg_19</tt> matches the text string <tt>"0x0013"</tt>:</t>
        <sourcecode type="cddl" name="example-printf.cddl"><![CDATA[
my_alg_19 = hexlabel<19>
hexlabel<K> = text .printf (["0x%04x", K])
]]></sourcecode>
        <t>The data items in the controller array do not need to be literals,
as for example in:</t>
        <sourcecode type="cddl" name="example-printf-uint.cddl"><![CDATA[
any_alg = hexlabel<1..20>
hexlabel<K> = text .printf (["0x%04x", K])
]]></sourcecode>
        <t>Here, <tt>any_alg</tt> matches the text strings <tt>"0x0013"</tt> or <tt>"0x0001"</tt> but
not <tt>"0x1234"</tt>.</t>
      </section>
      <section anchor="json-values">
        <name>JSON Values</name>
        <t>Some applications store complete JSON texts into text strings, the
JSON value for which can easily be defined in CDDL.
This is supported by a control operator similar to <tt>.cbor</tt> in <xref section="3.8.4" sectionFormat="of" target="RFC8610"/>.</t>
        <table>
          <name>Control Operator for Text Conversion of JSON values</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.json</tt></td>
              <td align="left">JSON</td>
              <td align="left">
                <xref target="STD90"/></td>
            </tr>
          </tbody>
        </table>
        <sourcecode type="cddl" name="example3.cddl"><![CDATA[
embedded-claims = text .json claims
claims = {iss: text, exp: text}
]]></sourcecode>
        <t>Note that a <tt>.jsonseq</tt> is not provided, as no use case is known yet.
There is no way to constrain the use of blank space in data items to
be validated; variants (e.g, not providing for any blank space) could
be defined.</t>
      </section>
    </section>
    <section anchor="text-processing">
      <name>Text Processing</name>
      <section anchor="join">
        <name>Join</name>
        <t>Often, text strings need to be constructed out of parts that can best
be modeled as an array.</t>
        <table>
          <name>Control Operator for Text Generation from Arrays</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.join</tt></td>
              <td align="left">concatenate elements of an array</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>In general, this control operator is hard to validate as it would
require full parser functionality.
It is therefore recommended to only use it in simple cases, and leave
full parsing to ABNF (see <xref section="3" sectionFormat="of" target="RFC9165"/>) or similar.</t>
        <sourcecode type="cddl" name="example4.cddl"><![CDATA[
legacy-ip-address = text .join [bytetext, ".", bytetext,
                           ".", bytetext, ".", bytetext]
bytetext = text .decimal byte
byte = 0..255
]]></sourcecode>
      </section>
    </section>
    <section anchor="deterministic-encoding">
      <name>Deterministic Encoding</name>
      <t><xref target="RFC8610"/> and <xref target="RFC8742"/> specify the control operators <tt>.cbor</tt> and
<tt>.cborseq</tt> to indicate that the value of a byte string should be an
encoded CBOR data item or a CBOR sequence.</t>
      <t>This specification provides complementary control operators <tt>.cbordet</tt>
and <tt>.cborseqdet</tt> that indicate that these data items/sequences need
to be encoded in accordance to Sections <xref target="RFC8949" section="4.2.1" sectionFormat="bare"/> and <xref target="RFC8949" section="4.2.2" sectionFormat="bare"/> of RFC 8949 <xref target="STD94"/>.</t>
      <table>
        <name>Control Operator for Deterministically Encoded Data Items and Sequences</name>
        <thead>
          <tr>
            <th align="left">name</th>
            <th align="left">meaning</th>
            <th align="left">reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.cbordet</tt></td>
            <td align="left">deterministically encoded CBOR data item</td>
            <td align="left">
              <xref target="RFC8610"/></td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cborseqdet</tt></td>
            <td align="left">CBOR sequence made from deterministically encoded CBOR data items</td>
            <td align="left">
              <xref target="RFC8742"/></td>
          </tr>
        </tbody>
      </table>
      <t>Note that considerations of deterministic representation at the
application level can often be expressed in the CDDL definition of the
right-hand side and then do not need additional control operators.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t><cref anchor="to-be-removed">RFC Editor: please replace RFC-XXXX with the RFC
number of this RFC and remove this note.</cref></t>
      <t>This document requests IANA to register the contents of
<xref target="tbl-iana-reqs"/> into the registry
"<xref section="CDDL Control Operators" relative="#cddl-control-operators" sectionFormat="bare" target="IANA.cddl"/>" of <xref target="IANA.cddl"/>:</t>
      <table anchor="tbl-iana-reqs">
        <name>New control operators to be registered</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.b64u</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64u-sloppy</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64c</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64c-sloppy</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b45</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b32</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.h32</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hex</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hexlc</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hexuc</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.decimal</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.printf</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.json</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.join</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cbordet</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cborseqdet</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section removeInRFC="true" anchor="implementation-status">
      <name>Implementation Status</name>
      <!-- RFC7942 -->

<t>In the CDDL tool described in <xref section="F" sectionFormat="of" target="RFC8610"/>,
the control operators defined in the present revision of this
specification are implemented as of version 0.10.4.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security considerations</name>
      <t>The security considerations of <xref target="RFC8610"/> apply.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <referencegroup anchor="STD90" target="https://www.rfc-editor.org/info/std90">
          <reference anchor="RFC8259" target="https://www.rfc-editor.org/info/rfc8259">
            <front>
              <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
              <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
              <date month="December" year="2017"/>
              <abstract>
                <t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
                <t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
              </abstract>
            </front>
            <seriesInfo name="STD" value="90"/>
            <seriesInfo name="RFC" value="8259"/>
            <seriesInfo name="DOI" value="10.17487/RFC8259"/>
          </reference>
        </referencegroup>
        <referencegroup anchor="STD94" target="https://www.rfc-editor.org/info/std94">
          <reference anchor="RFC8949" target="https://www.rfc-editor.org/info/rfc8949">
            <front>
              <title>Concise Binary Object Representation (CBOR)</title>
              <author fullname="C. Bormann" initials="C." surname="Bormann"/>
              <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
              <date month="December" year="2020"/>
              <abstract>
                <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
                <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
              </abstract>
            </front>
            <seriesInfo name="STD" value="94"/>
            <seriesInfo name="RFC" value="8949"/>
            <seriesInfo name="DOI" value="10.17487/RFC8949"/>
          </reference>
        </referencegroup>
        <reference anchor="RFC8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="C. Vigano" initials="C." surname="Vigano"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049). Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="IANA.cddl" target="https://www.iana.org/assignments/cddl">
          <front>
            <title>Concise Data Definition Language (CDDL)</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC9165">
          <front>
            <title>Additional Control Operators for the Concise Data Definition Language (CDDL)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="December" year="2021"/>
            <abstract>
              <t>The Concise Data Definition Language (CDDL), standardized in RFC 8610, provides "control operators" as its main language extension point.</t>
              <t>The present document defines a number of control operators that were not yet ready at the time RFC 8610 was completed:,, and for the construction of constants; / for including ABNF (RFC 5234 and RFC 7405) in CDDL specifications; and for indicating the use of a non-basic feature in an instance.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9165"/>
          <seriesInfo name="DOI" value="10.17487/RFC9165"/>
        </reference>
        <reference anchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC9285">
          <front>
            <title>The Base45 Data Encoding</title>
            <author fullname="P. Fältström" initials="P." surname="Fältström"/>
            <author fullname="F. Ljunggren" initials="F." surname="Ljunggren"/>
            <author fullname="D.W. van Gulik" initials="D.W." surname="van Gulik"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document describes the Base45 encoding scheme, which is built upon the Base64, Base32, and Base16 encoding schemes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9285"/>
          <seriesInfo name="DOI" value="10.17487/RFC9285"/>
        </reference>
        <reference anchor="RFC9485">
          <front>
            <title>I-Regexp: An Interoperable Regular Expression Format</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="T. Bray" initials="T." surname="Bray"/>
            <date month="October" year="2023"/>
            <abstract>
              <t>This document specifies I-Regexp, a flavor of regular expression that is limited in scope with the goal of interoperation across many different regular expression libraries.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9485"/>
          <seriesInfo name="DOI" value="10.17487/RFC9485"/>
        </reference>
        <reference anchor="RFC8742">
          <front>
            <title>Concise Binary Object Representation (CBOR) Sequences</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="February" year="2020"/>
            <abstract>
              <t>This document describes the Concise Binary Object Representation (CBOR) Sequence format and associated media type "application/cbor-seq". A CBOR Sequence consists of any number of encoded CBOR data items, simply concatenated in sequence.</t>
              <t>Structured syntax suffixes for media types allow other media types to build on them and make it explicit that they are built on an existing media type as their foundation. This specification defines and registers "+cbor-seq" as a structured syntax suffix for CBOR Sequences.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8742"/>
          <seriesInfo name="DOI" value="10.17487/RFC8742"/>
        </reference>
        <reference anchor="C" target="https://www.iso.org/standard/74528.html">
          <front>
            <title>Information technology — Programming languages — C</title>
            <author>
              <organization>International Organization for Standardization</organization>
            </author>
            <date year="2018" month="June"/>
          </front>
          <seriesInfo name="ISO/IEC" value="9899:2018"/>
          <annotation>Technically equivalent specification text is available at <eref target="https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf">https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf</eref></annotation>
          <refcontent>Fourth Edition</refcontent>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC9090">
          <front>
            <title>Concise Binary Object Representation (CBOR) Tags for Object Identifiers</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="July" year="2021"/>
            <abstract>
              <t>The Concise Binary Object Representation (CBOR), defined in RFC 8949, is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.</t>
              <t>This document defines CBOR tags for object identifiers (OIDs) and is the reference document for the IANA registration of the CBOR tags so defined.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9090"/>
          <seriesInfo name="DOI" value="10.17487/RFC9090"/>
        </reference>
        <reference anchor="RFC7951">
          <front>
            <title>JSON Encoding of Data Modeled with YANG</title>
            <author fullname="L. Lhotka" initials="L." surname="Lhotka"/>
            <date month="August" year="2016"/>
            <abstract>
              <t>This document defines encoding rules for representing configuration data, state data, parameters of Remote Procedure Call (RPC) operations or actions, and notifications defined using YANG as JavaScript Object Notation (JSON) text.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7951"/>
          <seriesInfo name="DOI" value="10.17487/RFC7951"/>
        </reference>
      </references>
    </references>
    <?line 388?>

<section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Henk Birkholz suggested the need for many of the control operators
defined here.</t>
      <!--  LocalWords:  dedenting dedented
 -->

</section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7Vb63YbR3L+30/RC58ck7uYIQCCN0S+UCRlc1citaKUjaMo
YmOmAYw1mIHmQhIm6bPvkDxAfuRJkjfZJ8lX1d2DGQAUZXuXxxbn0lPdXV31
1VfVTc/zxNVAbgtRREWsB/JrIeWLNNPyKE2KLI3l+UxnqkizXI7STB4dHz8X
ajjMNL6iGxnYdqlrJ8I0SNQUssJMjQov0sXIC4Zp5gVhGHtTCPfsR16sCp0X
4gsZ4mIge51e3+v0vN6uCFQxkHkRCjTNdZKX+UAWWalFXmRaTQfy9OT1MyE+
6Pl1moUDIT0acRDlWh6rQsljPYqSqIjSRD5XybhUY23bNGYlrnRSanwux1la
zgay5aQ8jRKVzeX58EcdFPKVnmUa4ygUi9w4enr+alO+UFFS6EQlgZYqCeXJ
De5yNMhbkDhVUQyBNPVvSQl+mo3p+TgqJuXQvvGux1sreqFWRjVoNSmKWT7Y
2rKtffO5H6Wr3221hJhFA/m2SIO2zNMMuhrluJpPzUWQTmcqKPhiitnk74RQ
ZTFJM1KBh/+ljBKo+siXT9NsqpKEn5n1PFJZjgk23mBOA/kmia50lkfF//1P
IZ9mGqLl63875Qa0XhrzeJnmxUgFE7m93en3O/wuiIr5wH5gHqQh+jn2evvb
Owf2SYmpodV3mjqd88PZJE3Q7g/9A6/f63q97r63u33Q6/JLbfQeqGH6bfFT
RFoXQiQ05gLDpIlevD4+6Ay4tTeQP+ZpAhPEz1cD+erZ0X6P+6ZG/aoRab/R
6KBPj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