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

Document Type Active Internet-Draft (individual)
Last updated 2019-10-13
Stream (None)
Intended RFC status (None)
Formats plain text pdf 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)
Independent Submission                                         U. Carion
Internet-Draft                                                   Segment
Intended status: Experimental                           October 13, 2019
Expires: April 15, 2020

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

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 April 15, 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 April 15, 2020                 [Page 1]
Internet-Draft     JSON Data Definition Format (JDDF)       October 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 . . . . . . . . . . . . . . . . . . . . . . .   4
     1.2.  Scope of Experiment . . . . . . . . . . . . . . . . . . .   5
   2.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   5
     2.1.  Extending JDDF's Syntax . . . . . . . . . . . . . . . . .  13
   3.  Semantics . . . . . . . . . . . . . . . . . . . . . . . . . .  14
     3.1.  Allowing Additional Properties  . . . . . . . . . . . . .  14
     3.2.  Errors  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     3.3.  Forms . . . . . . . . . . . . . . . . . . . . . . . . . .  16
       3.3.1.  Empty . . . . . . . . . . . . . . . . . . . . . . . .  16
       3.3.2.  Ref . . . . . . . . . . . . . . . . . . . . . . . . .  16
       3.3.3.  Type  . . . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.4.  Enum  . . . . . . . . . . . . . . . . . . . . . . . .  21
       3.3.5.  Elements  . . . . . . . . . . . . . . . . . . . . . .  22
       3.3.6.  Properties  . . . . . . . . . . . . . . . . . . . . .  24
       3.3.7.  Values  . . . . . . . . . . . . . . . . . . . . . . .  27
       3.3.8.  Discriminator . . . . . . . . . . . . . . . . . . . .  28
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  32
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  32
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  32
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  32
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  33
   Appendix A.  Comparison with CDDL . . . . . . . . . . . . . . . .  33
   Appendix B.  Examples . . . . . . . . . . . . . . . . . . . . . .  36
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  36
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  37

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
   to focus on enabling code generation from schemas; to this end,
   JDDF's expressiveness is strategically limited to be no more powerful
   than what can be expressed in the type systems of mainstream
Show full document text