JSON Schema Language
draft-json-schema-language-00

Document Type Active Internet-Draft (individual)
Last updated 2019-04-28
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)
JSON Working Group                                             U. Carion
Internet-Draft                                            April 28, 2019
Intended status: Standards Track
Expires: October 30, 2019

                          JSON Schema Language
                     draft-json-schema-language-00

Abstract

   JavaScript Object Notation (JSON) Schema Language is a portable
   method for describing the format of JSON data and the errors
   associated with ill-formed data.

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 October 30, 2019.

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 October 30, 2019                [Page 1]
Internet-Draft            JSON Schema Language                April 2019

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     4.1.  Keywords  . . . . . . . . . . . . . . . . . . . . . . . .   3
     4.2.  Forms . . . . . . . . . . . . . . . . . . . . . . . . . .   4
     4.3.  Additional restrictions to prevent ambiguity  . . . . . .   5
     4.4.  Evaluation context and reference resolution . . . . . . .   6
   5.  Semantics . . . . . . . . . . . . . . . . . . . . . . . . . .   8
     5.1.  Configuration . . . . . . . . . . . . . . . . . . . . . .   8
       5.1.1.  Strict schema semantics . . . . . . . . . . . . . . .   8
       5.1.2.  Strict instance semantics . . . . . . . . . . . . . .   8
     5.2.  Errors  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     5.3.  Evaluation  . . . . . . . . . . . . . . . . . . . . . . .   9
       5.3.1.  Empty form  . . . . . . . . . . . . . . . . . . . . .   9
       5.3.2.  Ref form  . . . . . . . . . . . . . . . . . . . . . .   9
       5.3.3.  Type form . . . . . . . . . . . . . . . . . . . . . .  10
       5.3.4.  Elements form . . . . . . . . . . . . . . . . . . . .  11
       5.3.5.  Properties form . . . . . . . . . . . . . . . . . . .  12
       5.3.6.  Values form . . . . . . . . . . . . . . . . . . . . .  14
       5.3.7.  Discriminator form  . . . . . . . . . . . . . . . . .  15
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  18
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .  18
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .  19
   Appendix A.  Acknowledgments  . . . . . . . . . . . . . . . . . .  19
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  19

1.  Introduction

   JSON Schema Language is a schema language for JSON data.  This
   document specifies:

   o  When a JSON object is a correct JSON Schema Language schema

   o  When a JSON document is valid with respect to a correct JSON
      Schema Language schema

   o  A standardized form of errors to produce when validating a JSON
      value

   JSON Schema Language is centered around the question of validating a
   JSON value (an "instance") against a JSON object (a "schema"), within
   the context of a collection of other schemas (an "evaluation
   context").

Carion                  Expires October 30, 2019                [Page 2]
Internet-Draft            JSON Schema Language                April 2019

2.  Conventions

   The keywords *MUST*, *MUST NOT*, *REQUIRED*, *SHALL*, *SHALL NOT*,
   *SHOULD*, *SHOULD NOT*, *RECOMMENDED*, *MAY*, and *OPTIONAL*, when
   they appear in this document, are to be interpreted as described in
   [RFC2119].

   The terms "absolute-URI" and "URI-reference", when they appear in
Show full document text