JSON Validation

Well-Formedness Check

Oxygen includes a built-in JSON validator (based on the free Java source code available at www.json.org), integrated with the general validation support.

Document Validation

Besides the basic validation provided by the built-in JSON validator that checks whether JSON documents are well formed, Oxygen also provides validation against an associated JSON Schema used to better describe the data format. It is also useful for automated testing and for ensuring the quality of user submitted data.

JSON Document Validation

Associating a JSON Schema

A JSON Schema can be associated to a JSON instance either through a validation scenario or directly within a JSON document.

Association Using a Validation Scenario

A JSON Schema can be associated to any JSON instance using the Validation Scenario configuration dialog box. Once you associate a JSON Schema to a JSON instance, you also benefit from content completion assistance while editing the instance according to the definitions in the associated schema.

Association Directly in a JSON Document

A JSON Schema can also be associated directly in a JSON document using the Associate Schema toolbar action. It adds a $schema property at the beginning of the document with its value set to the specified URL or relative file path.

Showing Validation Errors

Validation errors and warnings in JSON documents are marked in the main editing pane, in the vertical stripe on the right side of the editor, and in the Outline view. Colors help indicate the severity of the issue and details are presented in a popup window when hovering over an issue and in the stripe at the bottom of the editor.

JSON Validation Errors