Before the JSON validator can be used in the editor to check JSON data, a JSON schema must be assigned to the instance. Set the schema at the "JSON schema" field on the "Quick Associations" window of JSONBuddy. The assignment is saved and restored for the active document.
Use the "File | Open..." command or double-click the JSON document in the built-in File Explorer.
Assign the schema to the JSON instance at the "Quick Associations" pane.
The editor will remember the assigned JSON definitions automatically.
Once a schema is assigned to the document, the instant validation will start to run in the background and shows any error immediately. You can read more about the background validationhere.
2. Optionally modify the JSON data
Use the JSON editor environment if you want to do any modifications to the content before you run the validator to check if the JSON data is valid. Intelligent entry-helpers provide information from the assigned schema.
JSON specific syntax-coloring for increased readability.
Context sensitive entry helpers provide schema information.
Folding and brace highlighting makes it easy to navigate through the JSON structure.
To run the validator press the F11 key or use the "Validate JSON" command either from the JSON menu or click the toolbar button. This command is only enabled if a JSON schema is assigned to the active document.
The JSON validator reports all validation or well-formed errors at once.
Errors and warnings are reported in the Results pane of the editor.
You can copy the complete error report to the clipboard using the "Copy results" command from the context-menu of the Results pane.
Background validationis also available if a JSON schema is assigned to the current document
4. Fix any validation errors with the built-in JSON editor
After the validation, use the editor window to modify the JSON content. If any errors were reported by the JSON validator, a click on the results entry selects the related position in the editor window. A detailed error description helps to fix the problem in the JSON content. Press F11 or use the "Validate JSON" command again to see if all of the reported problems are corrected.
Jump-to-error functionality to quickly fix any parsing or validation errors.
The validator will report the error position in the JSON data and the violated schema rule.
The error description also includes the violated schema rule for this entry.
You can also use the JSON pointer evaluation window to check location paths.