DEV Community

vesper_finch
vesper_finch

Posted on

jq Is Great, But Here's a Zero-Dependency JSON Toolkit in Python

I love jq. It's fast, powerful, and indispensable for JSON work. But:

  • The syntax is its own language you have to learn
  • Installing it on corporate machines can be a battle
  • Complex queries become write-only code

So I built JSONKit — a Python CLI that handles the 90% of JSON tasks without any dependencies.

What It Does

# Pretty-print with syntax highlighting
python jsonkit.py format data.json

# Validate and show exact error location
python jsonkit.py validate maybe_broken.json

# Query with dot notation (no jq syntax needed)
python jsonkit.py query data.json "users[0].name"

# Diff two JSON files
python jsonkit.py diff old.json new.json

# Flatten nested JSON
python jsonkit.py flatten config.json
# {"database.host": "localhost", "database.port": 5432, ...}

# JSON → CSV conversion
python jsonkit.py csv users.json -o users.csv

# Pipe support
curl -s api.example.com/data | python jsonkit.py format
Enter fullscreen mode Exit fullscreen mode

The Problem With JSON in 2026

Every developer works with JSON daily. API responses, config files, data exports, log entries. Yet the tooling falls into two camps:

  1. Full-featured but heavy: jq, fx, gron (separate installs, custom syntax)
  2. Built-in but limited: python -m json.tool (just formatting)

JSONKit sits in between: powerful enough for real work, simple enough to pick up in 30 seconds.

Example: Comparing API Responses

You're debugging why staging returns different data than production:

curl -s https://staging.api.com/users > staging.json
curl -s https://prod.api.com/users > prod.json

python jsonkit.py diff staging.json prod.json
Enter fullscreen mode Exit fullscreen mode

Output:

  Changed: users[0].email
    - "test@staging.com"
    + "real@company.com"

  Added: users[3]
    + {"name": "New User", "role": "admin"}

  Removed: users[1].debug_info
    - {"trace_id": "abc123"}

Summary: 1 changed, 1 added, 1 removed
Enter fullscreen mode Exit fullscreen mode

No jq gymnastics needed.

Example: Flatten Config for Environment Variables

You have a nested JSON config and need flat env vars:

python jsonkit.py flatten config.json
Enter fullscreen mode Exit fullscreen mode
{
  "database.host": "localhost",
  "database.port": 5432,
  "database.credentials.user": "admin",
  "database.credentials.password": "secret",
  "cache.redis.url": "redis://localhost:6379",
  "cache.ttl": 3600
}
Enter fullscreen mode Exit fullscreen mode

Now pipe it into your env generator script.

Example: Quick Stats on a Data File

python jsonkit.py stats large_export.json
Enter fullscreen mode Exit fullscreen mode
JSON Stats:
  Type:       array
  Items:      1,247
  Max depth:  4
  Total keys: 18,705
  Unique keys: 15
  Size:       2.3 MB

  Key types:
    id:          integer (1,247)
    name:        string (1,247)
    email:       string (1,198) ⚠ 49 null
    created_at:  string (1,247)
    tags:        array (1,247)
    metadata:    object (892) ⚠ 355 null
Enter fullscreen mode Exit fullscreen mode

Instant understanding of any JSON file.

Why Zero Dependencies?

Every tool in the Vesper Developer Toolkit follows one rule: Python 3.10+, nothing else.

No pip install. No virtual environments. No version conflicts. Download one .py file and run it.

This matters when you're:

  • On a locked-down corporate machine
  • SSH'd into a production server
  • Setting up a new environment
  • Writing CI/CD pipelines

Get It

JSONKit is free and open source:

github.com/vesper-astrena/jsonkit

The Pro version ($19) adds JSONPath queries, schema generation, type generation (Python/TypeScript/Go), deep merge, bulk processing, and HTML reports.


Also check out: CSV Cleaner (fix messy CSVs) and PromptLab (test LLM prompts).

Top comments (0)