JSON editor in a nutshell: How to assign a JSON schema

The JSON Schema specification defines no way to assign a schema to a JSON data file. The schema used for validation is either set by the application or by metadata like transmission headers or filename patterns. As an editor for JSON Schema, JSONBuddy supports methods to assign a JSON Schema to the JSON data you are currently working on.

Assign a local schema file using the Quick associations pane

The most straightforward way is to use the Quick associations pane of the editor to select a local JSON Schema file from disk for the current document. This assignment is saved and restored the next time you open the instance in the JSON editor.

Open a JSON Schema from schemastore.org and automatically generate sample data

You can use the Open from JSON schema library... dialog in the editor to automatically generate sample data from any schema available at schemastore.org. The schema is also assigned to the generated JSON instance.

The file name matches a specific pattern

Many entries in the JSON Schema library at schemastore.org define a file-name pattern used to load a schema from the library for validating JSON data. For example, if you load a JSON document named test.bower.json, the data is recognized as a Bower package description file and you get the following message in the editor results window:

Automatically assigned Bower schema from schemastore.org

Automatically assigned Bower schema from schemastore.org.

Generate sample data from any JSON Schema

As a quick way to get a JSON instance from any schema, use the command to generate sample JSON data. This creates a new document in the editor and assigns the source schema in a single step.

Take a detailed look at some other features of JSONBuddy

JSONBuddy is more than just a JSON editor for Windows ®. Learn more on clicking the images and links below.