MyJSON
Editing

Transforms (sort, remove-nulls, remove-empties)

Three keys-and-values rewrites with one-step undo.

Command palette (Ctrl+P) → Transform: … entries.

Sort keys (recursive)

Alphabetizes object keys at every depth. Useful before diffing two documents that might just have key-order noise.

Remove null values

Deletes any key whose value is exactly null. Doesn't touch arrays; doesn't recurse into strings.

Remove empty values & arrays

Deletes empty strings, empty arrays, and empty objects recursively. Often produces a cleaner sample for code generation.

Undo

Every transform pushes the previous state onto the app-level undo stack. Ctrl+Z anywhere outside the editor reverses the last transform (up to 20 steps).

Examples

Clean up an API response before generating types

Your sample has experimental nulls and empty arrays that pollute the inferred schema.

  1. Ctrl+P → Transform: Remove null values.
  2. Ctrl+P → Transform: Remove empty values & arrays.
  3. Switch to the Codegen view — types are leaner.
Input (json)
{
  "id": 1,
  "tags": [],
  "deletedAt": null,
  "meta": {}
}
Output (json)
{
  "id": 1
}