Main menu

The applications main menu contains options to clear, load and save the
JSON contents of the application. Files can be loaded from disk (via menu or drag and drop),
url, or online, and can be saved online or to disk. Please note that due to security restrictions,
the application can only open urls from public websites, not from an intranet.
The data policy is described here.

Loading and saving documents in the cloud

To open a saved document, go to menu Open. This menu contains a list with all saved documents. Documents can be deleted here too by clicking the cross right of the document name. Note that the list with documents is stored in the browsers local storage. When reinstalling your browser or clearing all browser data, this list will be gone.

Online saved documents have a name, which is displayed in the top left of the application. The name can be changed by clicking it, this will open a dialog where a new name can be entered.

Load a document via url

Fia menu Open, Open url, one can open an arbitrary url into JSON Editor Online. Note that it's not possible to save changes to this url, and that the JSON document must be publicly available (CORS must be enabled for http://jsoneditoronline.org, and no credentials or tokens must be required).

Settings

In the settings, one can specify an indentation and JSON schema validation.

Indentation

Indentation in the left panel (code editor) can be configured. The indentation is 2 spaces by default. Indentation is only applied after formatting the code again (button "Format").

JSON Schema validation

To validate the structure of a JSON document against a JSON schema. As schema, you can either select one of your own online stored documents, or select a public url (like /test/schema.json). When a schema is specified, JSON Editor will show validation errors when the structure of your document does not conform the schema. More information on JSON schema validation can be found on http://json-schema.org/.

Panels

The application contains two panels: a code editor on the left,
and a Tree Editor on the right.

There is a splitter between the two panels, allowing to change the
width of both panels according to ones needs.
To copy the contents from one panel to an other, the two copy buttons
between the panels can be used.

Code editor

The code editor displays JSON data in a code editor.
The editor is capable of formatting, compacting, and inspecting JSON.

The menu of the code editor contains the following buttons:

Format.
Format the JSON data, make the data readable by applying indentation
and returns.

Compact.
Compact the JSON data, remove all unnecessary characters like
whitespaces and returns.

Tree editor

The Tree editor displays the JSON data in an editable tree.
The editor makes it easy to create, duplicate, remove fields,
and to edit the contents of the fields.

The menu of the tree editor contains the following functions:

Expand all. Expand all fields in the editor.

Collapse all. Collapse all fields in the editor.

Undo. Undo last action.

Redo. Redo last action.

Search. Search for text in the tree editor.
Search results will be highlighted, and can be iterated by
repeatedly pressing Enter or Shift+Enter.
The right side of the search box two buttons to go to the next or
previous search result.

The field values in the editor are editable input fields.
The fields can be dragged up and down using the dragarea
on the left side of the fields. When a field is the last item of the
childs of an array or object, the field can also be dragged horizontally
to move it in or out of the array or object.

Right from the dragarea is a button
to open the actions menu.
Depending on the type of field, the following functionality is
available in the actions menu:

Type. Change the type of the field. Choose from:

auto The field type is automatically determined from
the value and can be a string, number, boolean, or null.

object An unordered set of key/value pairs.

array An ordered collection of values.

string Field type is not determined from the value,
but always returned as string.

Sort. Sort the childs of an array or object.
For an array, the values of the childs will be sorted. In case of
an object, the childs will be sorted by key.
Arrays and objects can be sorted ascending or descending.

Insert. Insert a new field before current field.
Available types are auto (default), object, array, and string.

Append. Insert a new field after current field.
Available types are the same as the insert action.

Duplicate. Duplicate the field including all childs.

Remove. Remove the field including all childs.

Query parameters

To automatically load a JSON document when opening the JSON Editor,
the query parameters id, url, and json can be used:

To load an online stored document via it's id, add a query parameter named id to the url, having the documents id as value: