Internet-Draft CBOR Serialization July 2025
Mahy Expires 28 January 2026 [Page]
Workgroup:
Concise Binary Object Representation Maintenance and Extensions
Internet-Draft:
draft-mahy-cbor-serialization-latest
Published:
Intended Status:
Informational
Expires:
Author:
R. Mahy

Standard Serialization options in the Common Binary Object Representation (CBOR)

Abstract

This document renames and clarifies the serialization options defined in the CBOR specification and adds one additional serialization option, presenting them concisely and clearly.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://rohanmahy.github.io/cbor-serialization/draft-mahy-cbor-serialization.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-mahy-cbor-serialization/.

Discussion of this document takes place on the Concise Binary Object Representation Maintenance and Extensions Working Group mailing list (mailto:cbor@ietf.org), which is archived at https://www.ietf.org/mail-archive/web/cbor/current/maillist.html. Subscribe at https://www.ietf.org/mailman/listinfo/cbor/.

Source for this draft and an issue tracker can be found at https://github.com/rohanmahy/cbor-serialization.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 28 January 2026.

Table of Contents

1. Introduction

The CBOR specification [RFC8949] allows applications to define their own profiles of CBOR, including creating their own serialization rules. It also defines two specific serialization options ("Preferred Serialization" and "Core Deterministic Encoding") and gives a new name ("Length-First Map Key Ordering") for the serialization described in [RFC7049].

The serialization options for CBOR have been a source of confusion both among implementers and inside the IETF community. Some reasons for this confusion include the following.

2. Conventions and Definitions

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.

4. Discouraged Serializations

[RFC7049] defined a form of serialization similar to Ordered Serialization, but which used a different sorting algorithm. It is now referred to as Length-First Map Key Ordering Serialization. Use of Length-First Map Key Ordering Serialization is discouraged.

5. Application-specific Serialization Profiles

Applications can define their own serialization rules, which may build from any of the three concrete serializations defined in this document, or from none of them.

6. Security Considerations

TODO Security

7. IANA Considerations

This document has no IANA actions.

8. References

8.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC8949]
Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", STD 94, RFC 8949, DOI 10.17487/RFC8949, , <https://www.rfc-editor.org/rfc/rfc8949>.

8.2. Informative References

[RFC7049]
Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, , <https://www.rfc-editor.org/rfc/rfc7049>.

Acknowledgments

TODO acknowledge.

Author's Address

Rohan Mahy