Introduction
If you are new to JSON Schema, think of it as the blueprint for your data. Just as a set of architectural drawings ensures a building is structurally sound before a single brick is laid, a JSON Schema ensures that the data exchanged between our systems is valid, complete, and formatted correctly.
JSON Schema vs. XSD
If you have spent years working with XML and XSD (XML Schema Definition), you’ll find that JSON Schema feels very familiar. While the syntax is different, the core mission is the same.
| Feature | XSD (XML) | JSON Schema (JSON) |
|---|---|---|
| Structure | Elements and Attributes | Objects, Arrays, and Properties |
| Data Types | xs:string, xs:integer, etc. |
string, integer, number, boolean |
| Constraints | minOccurs, maxOccurs |
required, minItems, maxItems |
| Extensibility | Namespaces | $id, $schema, $ref |
Note: Unlike XSD, which is written in XML to describe XML, JSON Schema is written in JSON to describe JSON. This makes it much easier for modern web browsers and Node.js environments to parse natively.
Version 2020-12
Our API uses the 2020-12 dialect. This version introduced significant improvements in how schemas are organised and reused, specifically through the use of $dynamicRef and better support for vocabulary modularity.
The standard has been adopted by important projects including the OpenAPI (3.1) and AsyncAPI (3.0) specifications.
Further details on the specification itself can be found on the official JSON Schema website: https://json-schema.org/draft/2020-12/json-schema-core.html.
Validation Tools
The use of JSON Schema is widespread, and you may use any tools (commercial or open-source) you wish to handle and validate FinSpec documents against the JSON Schema.
Go to validation for suggestions on how to get started.