Edit values
There are two ways to change values: edit one string, number, boolean, or null in place in the tree, or open a node in the subtree editor to change it as JSON text. Both work on files you can edit, and both can be undone.
Edit a value inline
Section titled “Edit a value inline”-
In the tree, select the value and press F2, or double-click it. You can also right-click it and choose Edit Value….
-
Type the new value.
-
Press Enter to apply it, or Esc to cancel.
What you type depends on the value:
- A string: the editor shows the text without quotes, and whatever you type stays a string. Typing
42gives the string"42". - A number, boolean, or
null: type any JSON value that is not an object or array: a number,true,false,null, or a string in double quotes such as"pending". This is how you change a value’s type, for example from0tonull.
Numbers are written to the file exactly as you type them, so 1.50 stays 1.50 and long numbers keep every digit.
If the value is not valid, the editor says so and does not apply it, for example “Enter a JSON number, true, false, null or a quoted string.”
The inline editor is a single line. To edit a long value, or an object or array, use the subtree editor. A string that contains line breaks opens in the subtree editor instead, where each break appears as \n.
Edit a subtree
Section titled “Edit a subtree”The subtree editor shows a node as JSON text, with syntax colors, line numbers, and error checking, for example to change several fields of an object at once.
-
Select the node and press Shift+F2, or right-click it and choose Edit Subtree…. The tab switches to the Editor view.
-
Edit the text. Errors are marked as you type, and the toolbar counts them.
-
Select Commit, or press Ctrl+Enter. To leave without changes, select Cancel.
The editor shows the node’s text as it is in the file, with its own indentation. When you commit, the text replaces the node and nothing else in the file changes; the indentation around it is kept. Commit is unavailable while the text has errors.
Inside the editor, Ctrl+F finds text, and Ctrl+Z undoes typing. After committing, JSON Digger returns to the Tree view with the node selected.
The subtree editor opens nodes of up to 10 MiB; the toolbar shows the size of the text and turns red above it. See Limits.
After an edit
Section titled “After an edit”After each edit, the tree shows the changed node, selected. Search results, query results, and a selection of several nodes are cleared, because they refer to the version before the edit; run them again if you need them. Pins and bookmarks stay.
To undo the edit, press Ctrl+Z. To keep your edits, save them: see Save, undo, and recover edits.