lacspace-json
The friendly jq — query, convert, validate & merge.
npx lacspace-jsonEverything, in one command
lacspace-json gives you the 80% of jq you actually use — paths, select, map, sort_by, group_by, aggregates — plus first-class format conversion, JSON Schema validation, structural diff and deep merge, all behind one small binary with no dependencies. The query engine is a hand-written tokenizer→evaluator (no eval) and every object built from input is guarded against prototype pollution. Everything runs locally: no key, no account, no network, no telemetry.
What's inside
Safe jq-style query
paths, pipes, select, map, sort_by, group_by, aggregates; no eval.
5-format convert
JSON ⇄ YAML ⇄ TOML ⇄ CSV ⇄ NDJSON with auto-detection.
JSON Schema validation
draft-07 subset with clear per-error paths, non-zero exit.
Structural diff
added/removed/changed with dotted/bracket paths, coloured or --json.
Deep merge
N documents, array strategy concat/replace/by-key.
Pipe-friendly
reads stdin, --raw unquoted scalars, --get shorthand, --min/--sort-keys.
Zero deps, fully typed
dual ESM+CJS library sharing the CLI engine.
Copy, paste, done
Real commands and snippets — from a one-liner to the typed library.
cat users.json | lacspace-json -q '.users[] | select(.active) | .email' -rjq-style query, unquoted for the shell.
lacspace-json convert config.toml --to yamlAuto-detects input from the extension.
cat people.csv | lacspace-json convert --from csv --to jsonHeader row becomes object keys.
lacspace-json validate user.json --schema user.schema.jsonExits 1 with per-error paths if invalid.
lacspace-json diff old.yaml new.yamlWorks across formats too.
lacspace-json merge base.json patch.json --array by-key --array-key idMatches array items by id.
What people build with it
✓ Explore & reshape API responses in the terminal
✓ Convert config between YAML/TOML/JSON in build scripts
✓ CI gate that validates data against a schema
✓ Review what changed between two config/data files
Run lacspace-json today
Free, open-source, no API keys. It's a CLI and a typed library.
npx lacspace-json