Workflows¶
These recipes show how JEditor features combine in real Unity work. Each workflow uses only implemented product surfaces.
1. Bring a content file into a clean editing loop¶
Goal: Open a balance or config file and make it safe to edit.
- Tools → DivinityCodes → JEditor
- File → Open… the
.jsonfile - Run Smart Format or Format JSON
- Check Errors until clean
- Skim Health for structural warnings
- Pin the tab if it is a reference document
Why it works: Formatting and diagnostics first prevent structural tools from fighting broken syntax.
2. Edit nested gameplay data without losing place¶
Goal: Change one nested value in a large document.
- Open Documents → Tree
- Expand to the node (for example
$.encounters[2].waves[0].enemyId) - Copy the JSON path if you need it later
- Edit in Tree, Inspector, or the revealed editor range
- Confirm in Output that the mutation was recorded if you care about audit context
Why it works: Path + reveal keeps text and structure aligned.
3. Find every elite enemy above a level gate¶
Goal: Filter structured content.
Sample:
{
"enemies": [
{ "id": "slime", "level": 2, "elite": false },
{ "id": "captain", "level": 18, "elite": true },
{ "id": "lich", "level": 30, "elite": true }
]
}
- Open Search → Query → C# LINQ
- Run:
- Step results into the editor and adjust values
- Optionally rebuild the same idea in Form for teammates who prefer visual conditions
4. Prototype C# models from a live sample¶
Goal: Turn a response or content sample into starter classes.
- Keep valid JSON in Documents
- Open Live C#
- Set chips (PascalCase, Properties,
List<T>, JSON attributes as needed) - Copy generated C#
- Paste into your scripts assembly and rename to project conventions
Pair with Preferences → Live C# so the next preview starts closer to your standards.
5. Recover from a bad exploratory edit¶
Goal: Undo a sequence of structural changes safely.
- Open Version Control
- Select an earlier version → Preview
- If needed, Compare historical vs current
- Restore when the preview is correct
Why it works: Local timeline covers intermediate states that may never have been committed to Git.
6. Diff two balance dumps before merge¶
Goal: Review meaningful data changes.
- Open Compare
- Load left = current shipped file, right = proposed file (Browse or Documents)
- Enable Sync Scroll / Sync Selection as needed
- Click Compare
- Walk the Changes list and confirm each path
7. Create a contract and validate a content folder sample¶
Goal: Stop silent schema drift.
- Open a canonical document in Documents
- Switch to Schema → Create from Document
- Review required fields and types in the schema tree
- Validate Against another content document
- Click validation issues to repair either content or contract
- Use Reveal in Documents when you want the full Documents toolset on the target
8. Pull an API payload into Documents¶
Goal: Inspect a live JSON response with Tree / Search / Schema.
- Open HTTP
- Set method + URL (+ headers / body if required)
- Send
- Open in Documents
- Continue with Health, Live C#, or Schema validation
9. End-of-day content hygiene¶
Goal: Leave documents in a trustworthy state.
- Save all dirty tabs you intend to keep
- Confirm Errors is empty on active packs
- Skim Health for new warnings
- Close unneeded freeform Compare / HTTP / Schema tabs
- Rely on Git for project history. JEditor's local timeline is only for the editing session.