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

Document Type Active Internet-Draft (individual)
Last updated 2019-08-22
Stream (None)
Intended RFC status (None)
Formats plain text pdf html 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                                           August 22, 2019
Intended status: Informational
Expires: February 23, 2020

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

Abstract

   JSON Data Definition Format (JDDF) is a portable method for
   describing the format of JavaScript Object Notation (JSON) data and
   the errors associated with ill-formed data.  JDDF is designed to
   enable code generation from schemas.

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 February 23, 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
   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.

Carion                  Expires February 23, 2020               [Page 1]
Internet-Draft     JSON Data Definition Format (JDDF)        August 2019

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Extending JDDF's syntax . . . . . . . . . . . . . . . . .  11
   3.  Semantics . . . . . . . . . . . . . . . . . . . . . . . . . .  12
     3.1.  Allowing additional properties  . . . . . . . . . . . . .  12
     3.2.  Errors  . . . . . . . . . . . . . . . . . . . . . . . . .  13
     3.3.  Forms . . . . . . . . . . . . . . . . . . . . . . . . . .  13
       3.3.1.  Empty . . . . . . . . . . . . . . . . . . . . . . . .  14
       3.3.2.  Ref . . . . . . . . . . . . . . . . . . . . . . . . .  14
       3.3.3.  Type  . . . . . . . . . . . . . . . . . . . . . . . .  15
       3.3.4.  Enum  . . . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.5.  Elements  . . . . . . . . . . . . . . . . . . . . . .  18
       3.3.6.  Properties  . . . . . . . . . . . . . . . . . . . . .  19
       3.3.7.  Values  . . . . . . . . . . . . . . . . . . . . . . .  22
       3.3.8.  Discriminator . . . . . . . . . . . . . . . . . . . .  23
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  26
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  27
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  27
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  27
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  28
   Appendix A.  Comparison with CDDL . . . . . . . . . . . . . . . .  28
   Appendix B.  Examples . . . . . . . . . . . . . . . . . . . . . .  30
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  31
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  31

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 intentionally limited to be no more powerful
   than what can be expressed in the type systems of mainstream
   languages.

   The goals of JDDF are to:

   o  Provide an unambiguous description of the overall structure of a
      JSON document.

   o  Be able to describe common JSON datatypes and structures.

Carion                  Expires February 23, 2020               [Page 2]
Internet-Draft     JSON Data Definition Format (JDDF)        August 2019

   o  Provide a single format that is readable and editable by both
      humans and machines, and which can be embedded within other JSON
      documents.

   o  Enable code generation from JDDF schemas.
Show full document text