JSON Data Definition Format (JDDF)
draft-ucarion-jddf-04

Document Type Active Internet-Draft (individual)
Last updated 2019-11-18
Stream ISE
Intended RFC status Experimental
Formats plain text pdf htmlized bibtex
Stream ISE state Finding Reviewers
Consensus Boilerplate Unknown
Document shepherd Adrian Farrel
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to Adrian Farrel <rfc-ise@rfc-editor.org>
Independent Submission                                         U. Carion
Internet-Draft                                                   Segment
Intended status: Experimental                          November 18, 2019
Expires: May 21, 2020

                   JSON Data Definition Format (JDDF)
                         draft-ucarion-jddf-04

Abstract

   This document proposes a format, called JSON Data Definition Format
   (JDDF), for describing the shape of JavaScript Object Notation (JSON)
   messages.  Its main goals are to enable code generation from schemas
   as well as portable validation with standardized error indicators.
   To this end, JDDF is strategically limited to be no more expressive
   than the type systems of mainstream programming languages.  This
   strategic limitation, as well as the decision to make JDDF schemas be
   JSON documents, also makes tooling atop of JDDF easier to build.

   This document does not have IETF consensus and is presented here to
   facilitate experimentation with the concept of JDDF.

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 May 21, 2020.

Copyright Notice

   Copyright (c) 2019 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

Carion                    Expires May 21, 2020                  [Page 1]
Internet-Draft     JSON Data Definition Format (JDDF)      November 2019

   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  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   5
     1.2.  Scope of Experiment . . . . . . . . . . . . . . . . . . .   5
   2.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   6
     2.1.  Extending JDDF's Syntax . . . . . . . . . . . . . . . . .  15
   3.  Semantics . . . . . . . . . . . . . . . . . . . . . . . . . .  16
     3.1.  Allowing Additional Properties  . . . . . . . . . . . . .  16
     3.2.  Errors  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     3.3.  Forms . . . . . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.1.  Empty . . . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.2.  Ref . . . . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.3.  Type  . . . . . . . . . . . . . . . . . . . . . . . .  20
       3.3.4.  Enum  . . . . . . . . . . . . . . . . . . . . . . . .  24
       3.3.5.  Elements  . . . . . . . . . . . . . . . . . . . . . .  25
       3.3.6.  Properties  . . . . . . . . . . . . . . . . . . . . .  26
       3.3.7.  Values  . . . . . . . . . . . . . . . . . . . . . . .  29
       3.3.8.  Discriminator . . . . . . . . . . . . . . . . . . . .  30
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  36
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  36
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  36
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  36
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  37
   Appendix A.  Other Considerations . . . . . . . . . . . . . . . .  37
     A.1.  Support for 64-bit Numbers  . . . . . . . . . . . . . . .  37
     A.2.  Support for Non-Root Schemas  . . . . . . . . . . . . . .  38
   Appendix B.  Comparison with CDDL . . . . . . . . . . . . . . . .  40
   Appendix C.  Examples . . . . . . . . . . . . . . . . . . . . . .  43
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  43
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  44

1.  Introduction

   This document describes a schema language for JSON [RFC8259] called
   JSON Data Definition Format (JDDF).  The name JDDF is chosen to avoid
   confusion with "JSON Schema" from [I-D.handrews-json-schema].

   There exist many options for describing JSON data.  JDDF's niche is
Show full document text