Edit online

JSON Schema Converter

Oxygen JSON Editor 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 Tools > JSON Tools menu. The action opens a dialog box where you can configure some options for converting the JSON Schema.

Figure 1. Convert JSON Schema Dialog Box
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 into dependentRequired and dependentSchemas.
  • The items keyword (tuple array) is converted to prefixItems (2020-12).
  • The additionalItems keyword is converted to items (2020-12, only if prefixItems is present).
  • The exclusiveMinimum and exclusiveMaximum keywords with boolean values (Draft 4) are removed.
  • The id keyword (Draft 4) is converted to $id.
  • The $ref keyword wrapped into 1-item allOf is unwrapped because the latest versions allow processing $ref along with other keywords.