JSON panel
The template as JSON, validated before it is applied. Right panel in the DocStudio designer interface.
The JSON tab shows the whole template as formatted JSON. It is the most direct way to see exactly what DocStudio will store, and to make changes the inspector does not offer, such as a custom page size.
The text area fills the full height of the panel.
Reading
The text always reflects the current template. Every edit made elsewhere updates it. The structure follows the template schema.
Editing
Change the text and press Apply. Before anything changes the designer checks that:
- the text is valid JSON,
- the JSON is a valid template under the editor's limits (structure and semantics).
If the text is not JSON you see "The JSON is not valid". If it is JSON but not a valid template you see the problems, each linked to the affected element, and the template does not change. If it is valid the whole document is replaced in one undoable step and the canvas updates.
Revert discards your text edits and restores the current template. The Apply and Revert buttons are disabled while the text matches the template.
Good to know
- Applying keeps the selection when the selected element still exists.
- Comments and trailing commas are not valid JSON and are rejected.
- Ids must be unique. Duplicate ids are reported.
- Very large templates are slow to edit as text. Edit them with the inspector.
Limits
The panel does not format or validate while you type. It checks when you press Apply. There is no merge: Apply replaces the whole document.