Do you want to quickly generate a basic JSON schema in your editor from any JSON input to avoid some typing which needs to be done everytime you start writing a schema? A quick skeleton schema as a starting point with all current properties defined and their integral types already resolved? If yes, you can do this in JSONBuddy with ease.
This is how you do it in the editor:
- Open your JSON data as document. It doesn’t matter if you use the text or grid view.
- Use the following command to open a new document with the generated JSON schema: “JSON | Generate JSON schema from document”.
The generated schema is opened as a new document in the editor. Integral types are resolved and all objects which are not part of the top level are added as definitions to the schema. Equal object definitions will only appear once.
Automatic schema generation in the background
But even if you don’t use the command to generate a schema, a JSON schema is automatically generated in the background for any JSON document with currently no schema assigned. This schema is used to fill the Elements pane and to provide the entry-helper windows.