JSON Schema: A Media Type for Describing JSON Documents
draft-handrews-json-schema-02

Document Type Active Internet-Draft (individual)
Last updated 2019-09-17
Replaces draft-wright-json-schema
Stream (None)
Intended RFC status (None)
Formats plain text xml 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)
Internet Engineering Task Force                           A. Wright, Ed.
Internet-Draft
Intended status: Informational                           H. Andrews, Ed.
Expires: March 19, 2020
                                                          B. Hutton, Ed.
                                               Wellcome Sanger Institute
                                                               G. Dennis
                                                      September 16, 2019

        JSON Schema: A Media Type for Describing JSON Documents
                     draft-handrews-json-schema-02

Abstract

   JSON Schema defines the media type "application/schema+json", a JSON-
   based format for describing the structure of JSON data.  JSON Schema
   asserts what a JSON document must look like, ways to extract
   information from it, and how to interact with it.  The "application/
   schema-instance+json" media type provides additional feature-rich
   integration with "application/schema+json" beyond what can be offered
   for "application/json" documents.

Note to Readers

   The issues list for this draft can be found at <https://github.com/
   json-schema-org/json-schema-spec/issues>.

   For additional information, see <https://json-schema.org/>.

   To provide feedback, use this issue tracker, the communication
   methods listed on the homepage, or email the document editors.

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

Wright, et al.           Expires March 19, 2020                 [Page 1]
Internet-Draft                 JSON Schema                September 2019

   This Internet-Draft will expire on March 19, 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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  Conventions and Terminology . . . . . . . . . . . . . . . . .   4
   3.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   4.  Definitions . . . . . . . . . . . . . . . . . . . . . . . . .   5
     4.1.  JSON Document . . . . . . . . . . . . . . . . . . . . . .   5
     4.2.  Instance  . . . . . . . . . . . . . . . . . . . . . . . .   6
       4.2.1.  Instance Data Model . . . . . . . . . . . . . . . . .   6
       4.2.2.  Instance Media Types  . . . . . . . . . . . . . . . .   7
       4.2.3.  Instance Equality . . . . . . . . . . . . . . . . . .   7
     4.3.  JSON Schema Documents . . . . . . . . . . . . . . . . . .   8
       4.3.1.  JSON Schema Objects and Keywords  . . . . . . . . . .   8
       4.3.2.  Boolean JSON Schemas  . . . . . . . . . . . . . . . .   9
       4.3.3.  Schema Vocabularies . . . . . . . . . . . . . . . . .   9
       4.3.4.  Meta-Schemas  . . . . . . . . . . . . . . . . . . . .   9
       4.3.5.  Root Schema and Subschemas and Resources  . . . . . .  10
   5.  Fragment Identifiers  . . . . . . . . . . . . . . . . . . . .  10
   6.  General Considerations  . . . . . . . . . . . . . . . . . . .  11
     6.1.  Range of JSON Values  . . . . . . . . . . . . . . . . . .  11
     6.2.  Programming Language Independence . . . . . . . . . . . .  11
     6.3.  Mathematical Integers . . . . . . . . . . . . . . . . . .  11
     6.4.  Regular Expressions . . . . . . . . . . . . . . . . . . .  12
     6.5.  Extending JSON Schema . . . . . . . . . . . . . . . . . .  12
   7.  Keyword Behaviors . . . . . . . . . . . . . . . . . . . . . .  13
     7.1.  Lexical Scope and Dynamic Scope . . . . . . . . . . . . .  13
     7.2.  Keyword Interactions  . . . . . . . . . . . . . . . . . .  14
     7.3.  Default Behaviors . . . . . . . . . . . . . . . . . . . .  15
     7.4.  Identifiers . . . . . . . . . . . . . . . . . . . . . . .  15
     7.5.  Applicators . . . . . . . . . . . . . . . . . . . . . . .  15
Show full document text