Skip to content

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.

  1. Tools → DivinityCodes → JEditor
  2. File → Open… the .json file
  3. Run Smart Format or Format JSON
  4. Check Errors until clean
  5. Skim Health for structural warnings
  6. 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.

  1. Open Documents → Tree
  2. Expand to the node (for example $.encounters[2].waves[0].enemyId)
  3. Copy the JSON path if you need it later
  4. Edit in Tree, Inspector, or the revealed editor range
  5. 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 }
  ]
}
  1. Open Search → Query → C# LINQ
  2. Run:
objects
    .Where(x => x.Has("elite") && x["elite"] == true && x["level"] >= 20)
  1. Step results into the editor and adjust values
  2. 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.

  1. Keep valid JSON in Documents
  2. Open Live C#
  3. Set chips (PascalCase, Properties, List<T>, JSON attributes as needed)
  4. Copy generated C#
  5. 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.

  1. Open Version Control
  2. Select an earlier version → Preview
  3. If needed, Compare historical vs current
  4. 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.

  1. Open Compare
  2. Load left = current shipped file, right = proposed file (Browse or Documents)
  3. Enable Sync Scroll / Sync Selection as needed
  4. Click Compare
  5. Walk the Changes list and confirm each path

7. Create a contract and validate a content folder sample

Goal: Stop silent schema drift.

  1. Open a canonical document in Documents
  2. Switch to Schema → Create from Document
  3. Review required fields and types in the schema tree
  4. Validate Against another content document
  5. Click validation issues to repair either content or contract
  6. 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.

  1. Open HTTP
  2. Set method + URL (+ headers / body if required)
  3. Send
  4. Open in Documents
  5. Continue with Health, Live C#, or Schema validation

9. End-of-day content hygiene

Goal: Leave documents in a trustworthy state.

  1. Save all dirty tabs you intend to keep
  2. Confirm Errors is empty on active packs
  3. Skim Health for new warnings
  4. Close unneeded freeform Compare / HTTP / Schema tabs
  5. Rely on Git for project history. JEditor's local timeline is only for the editing session.