JSON Schema

JSON Schema provides a vocabulary for validating and annotating JSON documents. JSON Schema defines the structure, constraints, and metadata associated with JSON documents. It supports validation, documentation, tooling, and contracts for JSON-based APIs and data formats.

JSON Schema differs from JSON. JSON provides a lightweight, text-based syntax for structured data interchange. JSON Schema defines constraints and annotations that describe valid JSON content.

JSON Schema also differs from schema as a general concept. A schema defines information elements, permitted values, relationships, and constraints within a defined representation context. JSON Schema provides one schema vocabulary for JSON documents.

JSON Schema supports semantic when names, structures, constraints, annotations, examples, and documentation preserve traceability to defined domain meaning. JSON Schema syntax alone does not establish the full meaning of a domain.

JSON Schema content includes:

  • Object structures
  • Property names
  • Required properties
  • Datatypes
  • Enumerations
  • Pattern constraints
  • Range constraints
  • Array constraints
  • Nested object constraints
  • Conditional constraints
  • Default values
  • Descriptions
  • Examples
  • Validation keywords
  • Annotation keywords
  • Traceability to dommain meaning

schema vocabulary used to validate and annotate JSON documents

JSON Schema specifications and official JSON Schema documentation, specialized for use in the FX Demo Reference Architecture.

JSON Schema is not equivalent to JSON, a conceptual model, an ontology, or semantics as a whole. JSON Schema expresses selected semantic commitments in a JSON representation context when its structures, constraints, annotations, and documentation trace back to the governed domain's meaning.

The JSON Schema Core specification describes JSON Schema as a domain-specific, declarative language for validating and annotating JSON documents, and as a vocabulary for schemas that describe structure, constraints, and metadata associated with JSON documents. :contentReference[oaicite:0]{index=0} The JSON Schema site describes JSON Schema as the vocabulary that enables JSON data consistency, validity, and interoperability at scale. :contentReference[oaicite:1]{index=1}

A JSON Schema for an FX trade message constrains selected JSON content.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "FXTrade",
  "type": "object",
  "required": [
    "tradeIdentifier",
    "counterpartyLEI",
    "currencyPair",
    "notionalAmount",
    "tradeDate",
    "settlementDate"
  ],
  "properties": {
    "tradeIdentifier": {
      "type": "string",
      "description": "Identifier for the reported trade"
    },
    "counterpartyLEI": {
      "type": "string",
      "pattern": "^[A-Z0-9]{18}[0-9]{2}$",
      "description": "Legal entity identifier for a counterparty"
    },
    "currencyPair": {
      "type": "string",
      "pattern": "^[A-Z]{3}/[A-Z]{3}$",
      "description": "Ordered pair of currencies exchanged in the trade"
    },
    "notionalAmount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Amount used to calculate settlement obligations"
    },
    "tradeDate": {
      "type": "string",
      "format": "date",
      "description": "Date on which the trade occurs"
    },
    "settlementDate": {
      "type": "string",
      "format": "date",
      "description": "Date on which settlement occurs"
    }
  }
}

The JSON Schema constrains the JSON representation. It identifies required properties, datatypes, patterns, value constraints, and descriptions. The domain meaning of tradeIdentifier, counterpartyLEI, currencyPair, notionalAmount, tradeDate, and settlementDate still comes from the governed vocabulary, conceptual model, type system, lifecycle rules, report model, or other authoritative semantic source.


© 2026 Dido Solutions, Inc. and Jackrabbit Consulting, Inc.

  • dido/99_annexes/annex-b-terms-and-definitions/j/json_schema.txt
  • Last modified: 2026/07/18 12:33
  • by 127.0.0.1