Minimal JSON Type System
draft-boronine-teleport-01

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Last updated 2014-12-01
Stream (None)
Intended RFC status (None)
Formats pdf htmlized (tools) 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. Boronine, Ed.
Internet-Draft
Intended status: Informational                          December 2, 2014
Expires: June 5, 2015

                        Minimal JSON Type System
                       draft-boronine-teleport-01

Abstract

   Teleport is a minimal type system designed as an extension of JSON.
   It comes with 10 types sufficient for basic use, but it defines a
   pattern for extending it with arbitrary types.  Teleport's type
   definitions are JSON values, for example, an array of strings is
   defined as {"Array": "String"}.

   Teleport implementations can be used for data serialization, input
   validation, for documenting JSON APIs and for building API clients.

   This document provides the mathematical basis of Teleport and can be
   used for implementing libraries.

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 June 5, 2015.

Copyright Notice

   Copyright (c) 2014 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

Boronine                  Expires June 5, 2015                  [Page 1]
Internet-Draft              Abbreviated Title              December 2014

   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
   2.  Conventions and Terminology . . . . . . . . . . . . . . . . .   3
     2.1.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Type Patterns . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  JSON Schemas  . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  Mathematical Basis  . . . . . . . . . . . . . . . . . . . . .   4
     5.1.  Concrete Types  . . . . . . . . . . . . . . . . . . . . .   4
     5.2.  Generic Types . . . . . . . . . . . . . . . . . . . . . .   4
   6.  Built-in Concrete Types . . . . . . . . . . . . . . . . . . .   4
   7.  Built-in Generic Types  . . . . . . . . . . . . . . . . . . .   5
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     10.1.  Normative References . . . . . . . . . . . . . . . . . .   6
     10.2.  Informative References . . . . . . . . . . . . . . . . .   6
   Appendix A.  Mailing List . . . . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   In Teleport, a type is a relation between a type definition and a
   value space.  For example:

      t("Integer") = {0, -1,  1, -2,  2, -3,  3, ...}

   Here "Integer" is a type definition and t("Integer") is the set of
   all values this type can take.  The t function is used to represent
   this relationship.

   Because Teleport is based on JSON, all value spaces are sets of JSON
   values.  More interestingly, type definitions are JSON values too,
   which makes it trivial to share them with other programs.

   Teleport's design goals is to be a natural extension of JSON, be
   extremely lightweight, and extendable not only with rich types but
   with high-level type system concepts.

Boronine                  Expires June 5, 2015                  [Page 2]
Internet-Draft              Abbreviated Title              December 2014

2.  Conventions and Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

   The terms "JSON", "JSON text", "JSON value", "member", "element",
   "object", "array", "number", "string", "boolean", "true", "false",
   and "null" in this document are to be interpreted as defined in RFC
Show full document text