Agentic-first JSON manipulation service. Format, minify, validate, query, extract, flatten, unflatten, merge, diff, sort, filter, transform, and analyze JSON data. Plain text API, agent-driven, single Go binary.
# Build
make build
# Run
./jsonkit
# Or with custom port
./jsonkit -port 9000All endpoints accept JSON in the request body and return plain text by default. Add ?format=json or Accept: application/json for JSON output.
Pretty-print JSON with indentation.
curl -X POST localhost:8484/format -d '{"a":1,"b":2}'
curl -X POST "localhost:8484/format?indent=4" -d '{"a":1}'Compact JSON (no whitespace).
curl -X POST localhost:8484/minify -d '{ "a" : 1 }'Check if JSON is valid.
curl -X POST localhost:8484/validate -d '{"a":1}'
# valid=trueExtract a value using dot-notation path.
curl -X POST "localhost:8484/query?path=user.name" -d '{"user":{"name":"alice"}}'
# "alice"Extract specific keys from an object.
curl -X POST "localhost:8484/extract?keys=name,age" -d '{"name":"a","age":30,"x":1}'Flatten nested objects using dot notation.
curl -X POST localhost:8484/flatten -d '{"a":{"b":{"c":1}}}'
# {"a.b.c":1}Unflatten dot-separated keys into nested objects.
curl -X POST localhost:8484/unflatten -d '{"a.b.c":1}'
# {"a":{"b":{"c":1}}}Merge multiple JSON objects (later overrides earlier).
curl -X POST localhost:8484/merge -d '[{"a":1},{"b":2}]'Diff two JSON objects.
curl -X POST localhost:8484/diff -d '[{"a":1,"b":2},{"a":1,"c":3}]'Sort array elements (ascending).
curl -X POST localhost:8484/sort -d '[3,1,2]'
# [1,2,3]Filter array elements by key=value condition.
curl -X POST "localhost:8484/filter?cond=type=x" -d '[{"type":"x"},{"type":"y"}]'Apply one or more pipe-separated operations to JSON data. Operations are |-separated.
Supported operations: keys, values, sort, reverse, unique, flatten, minify, pretty, lowercase, uppercase
curl -X POST "localhost:8484/transform?ops=keys|sort" -d '{"c":3,"a":1,"b":2}'
# ["a","b","c"]
curl -X POST "localhost:8484/transform?ops=sort|reverse" -d '[1,2,3]'
# [3,2,1]
curl -X POST "localhost:8484/transform?ops=unique" -d '["a","b","a"]'
# ["a","b"]Get statistics about a JSON document.
curl -X POST localhost:8484/analyze -d '{"name":"test","count":42}'Returns a one-page operating manual for agents.
curl localhost:8484/help| Flag | Env Var | Default | Description |
|---|---|---|---|
-addr |
JSONKIT_ADDR |
0.0.0.0 |
Listen address |
-port |
JSONKIT_PORT |
8484 |
Listen port |
-secret |
JSONKIT_SECRET |
(auto) | Token signing secret |
make build # CGO_ENABLED=0, single binary
make test # go test -race
make vet # go vetMIT