|
2 | 2 | tags:
|
3 | 3 | - JTD
|
4 | 4 | ---
|
| 5 | + |
5 | 6 | # Choosing schema language
|
6 | 7 |
|
7 | 8 | [[toc]]
|
@@ -123,17 +124,19 @@ See [JSON Schema](../json-schema.md) for more information and the list of define
|
123 | 124 | - Defines the shape of JSON data via strictly defined schema forms (rather than the collection of restrictions).
|
124 | 125 | - Effective support for tagged unions.
|
125 | 126 | - 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. |
128 | 130 |
|
129 | 131 | **Cons**:
|
130 | 132 |
|
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. |
134 | 137 |
|
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. |
136 | 139 |
|
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. |
138 | 141 |
|
139 | 142 | See [JSON Type Definition](../json-type-definition.md) for more information and the list of defined schema forms.
|
0 commit comments