JSON Schema Converter
Oxygen XML Editor Eclipse plugin includes a tool for converting an older version of a JSON schema (Draft 4, 6, or 7) to the latest versions (2019-09 or 2020-12).
To convert a JSON schema, select Convert JSON Schema from the menu. The action opens a dialog box where you can configure some options for converting the JSON Schema.
The Convert JSON Schema dialog box includes the
following fields and options:
- JSON Schema URL
- The URL of the JSON schema file. You can specify the path by using the text field, the history drop-down menu, or the browsing actions in the Browse drop-down list.
- Output JSON Schema
- The path to the folder where the converted JSON schema will be saved.
- Open in Editor
- If selected, the converted JSON schema is opened in the editor.
- JSON Schema version
- The version of the resulting JSON schema. The possible choices are: Draft 2019-09 or 2020-12.
You can click Convert at any point to generate the JSON Schema.
Conversion Notes
- The
$schema
declaration is changed according to the selected JSON schema version. - The
definitions
keyword is converted to$defs
and all the references are updated. - The
dependencies
keyword is split intodependentRequired
anddependentSchemas
. - The
items
keyword (tuple array) is converted toprefixItems
(2020-12). - The
additionalItems
keyword is converted toitems
(2020-12, only ifprefixItems
is present). - The
exclusiveMinimum
andexclusiveMaximum
keywords with boolean values (Draft 4) are removed. - The
id
keyword (Draft 4) is converted to$id
. - The
$ref
keyword wrapped into 1-itemallOf
is unwrapped because the latest versions allow processing$ref
along with other keywords.