Binary Encodings for JavaScript Object Notation: JSON-B, JSON-C, JSON-D
draft-hallambaker-jsonbcd-16

Document Type Active Internet-Draft (individual)
Author Phillip Hallam-Baker 
Last updated 2020-07-27
Stream (None)
Intended RFC status (None)
Formats plain text html xml pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                 P. M. Hallam-Baker
Internet-Draft                                              27 July 2020
Intended status: Informational                                          
Expires: 28 January 2021

Binary Encodings for JavaScript Object Notation: JSON-B, JSON-C, JSON-D
                      draft-hallambaker-jsonbcd-16

Abstract

   Three binary encodings for JavaScript Object Notation (JSON) are
   presented.  JSON-B (Binary) is a strict superset of the JSON encoding
   that permits efficient binary encoding of intrinsic JavaScript data
   types.  JSON-C (Compact) is a strict superset of JSON-B that supports
   compact representation of repeated data strings with short numeric
   codes.  JSON-D (Data) supports additional binary data types for
   integer and floating-point representations for use in scientific
   applications where conversion between binary and decimal
   representations would cause a loss of precision.

   This document is also available online at
   http://mathmesh.com/Documents/draft-hallambaker-jsonbcd.html.

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 2021.

Copyright Notice

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

Hallam-Baker             Expires 28 January 2021                [Page 1]
Internet-Draft           JSON-B, JSON-C, JSON-D                July 2020

   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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Objectives  . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Definitions . . . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Requirements Language . . . . . . . . . . . . . . . . . .   4
     2.2.  Defined Terms . . . . . . . . . . . . . . . . . . . . . .   4
     2.3.  Related Specifications  . . . . . . . . . . . . . . . . .   4
     2.4.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Extended JSON Grammar . . . . . . . . . . . . . . . . . . . .   5
   4.  JSON-B  . . . . . . . . . . . . . . . . . . . . . . . . . . .   7
     4.1.  JSON-B Examples . . . . . . . . . . . . . . . . . . . . .   9
   5.  JSON-C  . . . . . . . . . . . . . . . . . . . . . . . . . . .  10
     5.1.  JSON-C Examples . . . . . . . . . . . . . . . . . . . . .  11
   6.  JSON-D (Data) . . . . . . . . . . . . . . . . . . . . . . . .  12
   7.  JBCD Frames and Records . . . . . . . . . . . . . . . . . . .  13
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  15
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  15
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  15
   11. Normative References  . . . . . . . . . . . . . . . . . . . .  16
   12. Informative References  . . . . . . . . . . . . . . . . . . .  16

1.  Introduction

   JavaScript Object Notation (JSON) is a simple text encoding for the
   JavaScript Data model that has found wide application beyond its
   original field of use.  In particular JSON has rapidly become a
   preferred encoding for Web Services.

   JSON encoding supports just four fundamental data types (integer,
   floating point, string and boolean), arrays and objects which consist
   of a list of tag-value pairs.

   Although the JSON encoding is sufficient for many purposes it is not
   always efficient.  In particular there is no efficient representation
   for blocks of binary data.  Use of base64 encoding increases data
   volume by 33%. This overhead increases exponentially in applications
   where nested binary encodings are required making use of JSON
   encoding unsatisfactory in cryptographic applications where nested
   binary structures are frequently required.

Hallam-Baker             Expires 28 January 2021                [Page 2]
Internet-Draft           JSON-B, JSON-C, JSON-D                July 2020

   Another source of inefficiency in JSON encoding is the repeated
   occurrence of object tags.  A JSON encoding containing an array of a
Show full document text