Import & export

Portable query JSON

Export saves your current query tree and data source as JSON. Import loads a file back into the builder. Share copies the JSON to your clipboard.

Header actions

  • Export — downloads lantern-query-{timestamp}.json
  • Import — pick a JSON file from disk
  • Share — copy export JSON to clipboard
  • Save (Ctrl+S) — push a snapshot to Activity history

Export format

{
  "version": 1,
  "schemaId": "users",
  "exportedAt": "2025-06-06T12:00:00.000Z",
  "root": {
    "id": "root",
    "type": "group",
    "logic": "and",
    "children": [ ... ]
  }
}

Import safety

Lantern validates imports before applying them:

  • Must be valid JSON with version, schemaId, and root
  • Maximum tree depth enforced (protects against oversized payloads)
  • Node shapes must match expected rule/group structure

Malformed files show an error in the header or import modal.

Presets vs snapshots

FeatureWhereUse case
SnapshotsActivity tab / Ctrl+SVersion history while you work
PresetsDetails tab → Quick presetsNamed templates you reload often
Export fileHeader → ExportShare with others or backup offline

To save a preset: type a name in the Details tab input and press Enter. Load from the dropdown below.

Keyboard shortcuts · Open builder