JSON Schema Validation: A Vocabulary for Structural Validation of JSON
draft-wright-json-schema-validation-01

Document Type Active Internet-Draft (individual)
Last updated 2017-04-16
Replaces draft-fge-json-schema-validation
Stream (None)
Intended RFC status (None)
Formats plain text xml 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)
Internet Engineering Task Force                           A. Wright, Ed.
Internet-Draft
Intended status: Informational                                   G. Luff
Expires: October 17, 2017
                                                         H. Andrews, Ed.
                                                        Cloudflare, Inc.
                                                          April 15, 2017

 JSON Schema Validation: A Vocabulary for Structural Validation of JSON
                 draft-wright-json-schema-validation-01

Abstract

   JSON Schema (application/schema+json) has several purposes, one of
   which is JSON instance validation.  This document specifies a
   vocabulary for JSON Schema to describe the meaning of JSON documents,
   provide hints for user interfaces working with JSON data, and to make
   assertions about what a valid document must look like.

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 <http://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 http://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 17, 2017.

Wright, et al.          Expires October 17, 2017                [Page 1]
Internet-Draft           JSON Schema Validation               April 2017

Copyright Notice

   Copyright (c) 2017 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
   (http://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  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Conventions and Terminology . . . . . . . . . . . . . . . . .   4
   3.  Interoperability considerations . . . . . . . . . . . . . . .   4
     3.1.  Validation of string instances  . . . . . . . . . . . . .   4
     3.2.  Validation of numeric instances . . . . . . . . . . . . .   4
     3.3.  Regular expressions . . . . . . . . . . . . . . . . . . .   4
   4.  General validation considerations . . . . . . . . . . . . . .   5
     4.1.  Keywords and instance primitive types . . . . . . . . . .   5
     4.2.  Validation of primitive types and child values  . . . . .   5
     4.3.  Constraints and missing keywords  . . . . . . . . . . . .   6
     4.4.  Keyword independence  . . . . . . . . . . . . . . . . . .   6
   5.  Meta-schema . . . . . . . . . . . . . . . . . . . . . . . . .   6
   6.  Validation keywords . . . . . . . . . . . . . . . . . . . . .   6
     6.1.  multipleOf  . . . . . . . . . . . . . . . . . . . . . . .   6
     6.2.  maximum . . . . . . . . . . . . . . . . . . . . . . . . .   6
     6.3.  exclusiveMaximum  . . . . . . . . . . . . . . . . . . . .   7
     6.4.  minimum . . . . . . . . . . . . . . . . . . . . . . . . .   7
     6.5.  exclusiveMinimum  . . . . . . . . . . . . . . . . . . . .   7
     6.6.  maxLength . . . . . . . . . . . . . . . . . . . . . . . .   7
     6.7.  minLength . . . . . . . . . . . . . . . . . . . . . . . .   7
     6.8.  pattern . . . . . . . . . . . . . . . . . . . . . . . . .   8
     6.9.  items . . . . . . . . . . . . . . . . . . . . . . . . . .   8
     6.10. additionalItems . . . . . . . . . . . . . . . . . . . . .   8
     6.11. maxItems  . . . . . . . . . . . . . . . . . . . . . . . .   9
     6.12. minItems  . . . . . . . . . . . . . . . . . . . . . . . .   9
     6.13. uniqueItems . . . . . . . . . . . . . . . . . . . . . . .   9
     6.14. contains  . . . . . . . . . . . . . . . . . . . . . . . .   9
     6.15. maxProperties . . . . . . . . . . . . . . . . . . . . . .   9
Show full document text