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, androot - 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
| Feature | Where | Use case |
|---|---|---|
| Snapshots | Activity tab / Ctrl+S | Version history while you work |
| Presets | Details tab → Quick presets | Named templates you reload often |
| Export file | Header → Export | Share 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.