What you see
Wire a DAT that holds JSON into the component's input, or set Source to File and pick a JSON File. The tree appears in the component's panel.
JSON Tree is also the viewer you see inside Preset Inspector.
Loading your data
The Source menu decides where the tree gets its data.
- Input: reads JSON from the DAT wired into the component. The tree updates by itself when that DAT changes.
- File: reads the file set in JSON File. While that field is empty, nothing happens and you get no warning.
- Data: shows data that another tool or script sends in. You usually do not pick this yourself: it is set for you when data arrives.
Finding your way around
Open or close that branch, one level at a time.
Open everything underneath it at once.
Show only the branches that contain a match.
Open or close every branch.
Do the same from the component's parameters.
The search field and the Search parameter are the same thing. A search you leave in place is applied again when you reopen your project.
Changing values
With Editable on, which it is by default, you can change any value right in the tree.
Edit it in place.
- Numbers stay numbers: a new value keeps the type of the old one. If you type something that is not a number over a number, the edit is refused instead of turning it into text.
- Whole numbers: type a fraction over a whole number and it becomes a decimal. Type a whole number and it stays whole.
- Saving: when the tree is reading a file or sent data, your edit is saved back there. If saving fails, the tree tells you instead of pretending it worked.
Reading presets
With Schema-Aware Params on, each saved TDXMorph parameter shows as one tidy row instead of a branch of loose keys. A preset with thirty parameters shows thirty rows instead of a hundred and twenty.
- The row: the parameter's name, a strip of extra details, its value and a small badge for its type.
- Details strip: extras such as min and max. They are for reading only.
- Amber lock: marks a locked parameter.
Turn Schema-Aware Params off to see exactly how the data is stored, key by key.
Changing the look
Recolour the tree and the toolbar: Carbon, Verdigris or Mono.
Put the skin's colours back after you changed a colour by hand.
Using it in your own tool
You can place JSON Tree inside a tool of your own and feed it your data.
- Feed it: wire your JSON into its input, or have your tool send data in, which switches Source to Data.
- Hide the toolbar: turn off Show Toolbar when your tool supplies its own search and buttons.
- React to edits: the On Edit pulse on the Callbacks page fires after each edit, so your tool can notice the change and save it its own way.
Preset Inspector is built exactly this way, and is a good example to look at.