Skip to content

Commit eaf4615

Browse files
committed
docs: update schema language comparison
1 parent bf1266a commit eaf4615

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/guide/schema-language.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
tags:
33
- JTD
44
---
5+
56
# Choosing schema language
67

78
[[toc]]
@@ -123,17 +124,19 @@ See [JSON Schema](../json-schema.md) for more information and the list of define
123124
- Defines the shape of JSON data via strictly defined schema forms (rather than the collection of restrictions).
124125
- Effective support for tagged unions.
125126
- Designed to protect against user mistakes.
126-
- Supports compilation of schemas to efficient [serializers and parsers](./getting-started.md#parsing-and-serializing-json) (no need to validate as a separate step)
127-
- Approved as [RFC8927](https://datatracker.ietf.org/doc/rfc8927/)
127+
- Supports compilation of schemas to efficient [serializers and parsers](./getting-started.md#parsing-and-serializing-json) (no need to validate as a separate step).
128+
- Approved as [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
129+
- Substantial industry adoption since it was standardized in 2020, Ajv v8.12.0 fixed all reported JTD bugs.
128130

129131
**Cons**:
130132

131-
- Limited, compared with JSON Schema - no support for untagged unions<sup>\*</sup>, conditionals, references between different schema files<sup>\*\*</sup>, etc.
132-
- No meta-schema in the specification<sup>\*</sup>.
133-
- Brand new - limited industry adoption (as of January 2021).
133+
- Limited, compared with JSON Schema - no support for untagged unions<sup>1</sup>, conditionals, references between different schema files<sup>2</sup>, etc.
134+
- No meta-schema in the specification<sup>3</sup>.
135+
136+
<sup>1</sup> Ajv defines non-standard keyword "union" that can be used inside "metadata" object.
134137

135-
<sup>\*</sup> Ajv defines meta-schema for JTD schemas and non-standard keyword "union" that can be used inside "metadata" object.
138+
<sup>2</sup> You can still combine schemas from multiple files in the application code.
136139

137-
<sup>\*\*</sup> You can still combine schemas from multiple files in the application code.
140+
<sup>3</sup> Ajv defines meta-schema for JTD schemas.
138141

139142
See [JSON Type Definition](../json-type-definition.md) for more information and the list of defined schema forms.

0 commit comments

Comments
 (0)