What is the Data & Schema Editor?
The Data & schema editor is a powerful tool that allows you to view, edit, and manage your JSON data directly within the JSONsilo console. It puts a silo’s JSON and its JSON Schema side by side, so a value that doesn’t fit the schema is flagged in both at once. To open it, go to Silos, open a silo, and click the Data & schema tab.
Features
- Syntax Highlighting: The editor highlights JSON syntax, making it easier to read and identify different elements within your data.
- Validation: It automatically checks for JSON syntax errors, helping you ensure that your data is correctly formatted.
- Schema Checks: With a schema saved, the editor marks any value that doesn’t match it as you type.
- Editing Tools: The editor includes features like auto-completion, find and replace, and formatting options to streamline your editing process.
- Outline: A list of the top-level keys or items provides an overview of your JSON document, allowing for quick navigation through large files.
- Changes View: See a diff of your unsaved edits before you save them.
Layout
Use the Layout switch above the panes to choose what you see.
Both editors follow the console’s light or dark appearance.
Data pane
The Data pane on the left holds the silo’s JSON.- Editor mode: Switch between three modes.
- Edit: Type directly in the editor.
- Upload: Drop a
.jsonfile or clickBrowse files. The file replaces the editor’s content and is checked against the schema before you save. - Changes: A read-only diff of your unsaved edits against the saved data. Available when you have unsaved changes.
- Format: Re-indents the JSON. If the silo has a saved schema, it also puts the keys in the schema’s order.
- Download: Download the JSON in the editor to your local machine, unsaved edits included.
- Discard: Throw away your unsaved edits and return to the saved data.
- Save data: Save changes made to the JSON data. A dot on the button means you have unsaved changes. You can also press
⌘Son macOS orCtrl Son Windows and Linux. - Path bar: Shows where your cursor is in the document, for example
store › products › [0] › price. - Outline: Opens a list of the top-level keys or array items. Click one to jump to it.
- Editor Area: The main area where you can view and edit your JSON data.
- Status bar: Shows the cursor position, the size of the data, and whether the document is Valid JSON.
The size in the status bar is measured the same way as your plan’s per-silo limit: the JSON with whitespace removed. Indentation in the editor doesn’t count towards it.
Fixing syntax errors
When the JSON doesn’t parse, the status bar shows the number of syntax errors and a notice above the panes names the first one with its line number. ClickGo to line to jump to it.
Fixing data that doesn’t match the schema
When the silo has a schema and a value doesn’t match it, a notice above the panes names the invalid value. It offers two shortcuts:Go to data line: Jumps to the value in the data editor.Show the rule: Opens the schema editor at the rule the value breaks.
- Schema locked: You can’t save until the data matches. The
Save databutton is disabled. - Schema unlocked: The notice is a warning only, and the data still saves.
Schema pane
The Schema pane on the right holds the silo’s JSON Schema. Use it to enable, edit, lock, and remove the schema. See Schema Lock for a full guide.Unsaved changes
If you try to leave the tab with unsaved changes to the data or the schema, the console asks Leave without saving? and lists what would be lost. ClickStay to go back, or Leave without saving to discard the changes.