Concise Binary Object Representation (CBOR) Sequences
RFC 8742

Document Type RFC - Proposed Standard (February 2020; No errata)
Author Carsten Bormann 
Last updated 2020-02-19
Replaces draft-bormann-cbor-sequence
Stream IETF
Formats plain text html xml pdf htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Jim Schaad
Shepherd write-up Show (last changed 2019-08-30)
IESG IESG state RFC 8742 (Proposed Standard)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to Jim Schaad <ietf@augustcellars.com>
IANA IANA review state IANA OK - Actions Needed
IANA action state RFC-Ed-Ack
IANA expert review state Expert Reviews OK
´╗┐

Internet Engineering Task Force (IETF)                        C. Bormann
Request for Comments: 8742                        Universit├Ąt Bremen TZI
Category: Standards Track                                  February 2020
ISSN: 2070-1721

         Concise Binary Object Representation (CBOR) Sequences

Abstract

   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.

   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.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8742.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction
     1.1.  Conventions Used in This Document
   2.  CBOR Sequence Format
   3.  The "+cbor-seq" Structured Syntax Suffix
   4.  Practical Considerations
     4.1.  Specifying CBOR Sequences in Concise Data Definition
           Language (CDDL)
     4.2.  Diagnostic Notation
     4.3.  Optimizing CBOR Sequences for Skipping Elements
   5.  Security Considerations
   6.  IANA Considerations
     6.1.  Media Type
     6.2.  CoAP Content-Format Registration
     6.3.  Structured Syntax Suffix
   7.  References
     7.1.  Normative References
     7.2.  Informative References
   Acknowledgements
   Author's Address

1.  Introduction

   The Concise Binary Object Representation (CBOR) [RFC7049] can be used
   for serialization of data in the JSON [RFC8259] data model or in its
   own, somewhat expanded, data model.  When serializing a sequence of
   such values, it is sometimes convenient to have a format where these
   sequences can simply be concatenated to obtain a serialization of the
   concatenated sequence of values or to encode a sequence of values
   that might grow at the end by just appending further CBOR data items.

   This document describes the concept and format of "CBOR Sequences",
   which are composed of zero or more encoded CBOR data items.  CBOR
   Sequences can be consumed (and produced) incrementally without
   requiring a streaming CBOR parser that is able to deliver
   substructures of a data item incrementally (or a streaming encoder
   able to encode from substructures incrementally).

   This document defines and registers the "application/cbor-seq" media
   type in the "Media Types" registry along with a Constrained
   Application Protocol (CoAP) Content-Format identifier.  Media type
   structured syntax suffixes [RFC6838] were introduced as a way for a
   media type to signal that it is based on another media type as its
   foundation.  CBOR [RFC7049] defines the "+cbor" structured syntax
   suffix.  This document defines and registers the "+cbor-seq"
   structured syntax suffix in the "Structured Syntax Suffix Registry".

1.1.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   In this specification, the term "byte" is used in its now-customary
   sense as a synonym for "octet".

2.  CBOR Sequence Format

   Formally, a CBOR Sequence is a sequence of bytes that is recursively
   defined as either of the following:

   *  an empty (zero-length) sequence of bytes

   *  the sequence of bytes making up an encoded CBOR data item
      [RFC7049] followed by a CBOR Sequence.
Show full document text