Skip to content

0. Introduction

ESType is a JSON Schema vocabulary that states the JavaScript (ECMAScript) type of a value. It is part of the LingoData family of specifications for data interoperability.

JSON Schema describes JSON documents, and JSON has no dates, big integers, sets, maps or binary data. The same date can travel as a plain JSON string or as an ECSON typed value ({ "$date": "..." }). With ESType, a schema declares the type of the value once, accepts both forms, and lets libraries convert the value to the native type. ESType is unrelated to the jstype option of Protocol Buffers (section 5.3).

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here.

  • ES type: a type that ECSON serializes and that estype can name (ESTYPE_KEYWORD, ESTYPE_EXCLUDED), identified by its ECSON tag without $ (for example date for $date).
  • ECSON form: the typed value that ECSON uses to represent the value (ECSON section 1).
  • Plain JSON form: the JSON value of a value without ECSON (ECSON section 5.3).
  • Native value: the value in the native type of the host language (for example a JavaScript Date).
  • Declared schema: the keywords of a subschema other than estype, as written by the author of the schema.
  • ECSON branch, plain branch and exclusion schema: the parts of a compiled subschema (COMPILE_ECSON_BRANCH, COMPILE_PLAIN_BRANCH).
  • Default plain schema: the schema of the table in section 2.1 used for the plain branch when the declared schema has no keyword other than those of COMPILE_OUTSIDE_KEYWORDS (COMPILE_PLAIN_BRANCH).
  • Compiled subschema: the result of compiling a subschema with estype (COMPILE_REWRITE).
  • Converter: an implementation that meets the Converter level (section 5.1).
  • Path of a value: the location of the value in the document, from its root.

SPEC_SEMVER MUST

This specification MUST be versioned independently of the other specifications of the LingoData family, following Semantic Versioning 2.0.0.

Source: lingodata/estype@0cbfb46 · spec/sections/00-introduction.md · estype 0.1.0 (draft)

LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.