A CLI tool for viewing and manipulating JSON files
Project description
jsp
A CLI tool for viewing and manipulating JSON files. Pretty-prints JSON with syntax highlighting by default, supports filtering by keys, and allows in-memory modifications for easy piping — without altering the original file.
Features
- Pretty-print JSON with syntax highlighting (default behavior)
- Filter by key(s) to extract and display specific parts of a JSON structure
- In-memory modifications — add, update, replace, or delete values in the output without touching the source file
- Merge from file or stdin — set a key's value to the contents of another JSON file, or pipe JSON in via stdin
- Stdin as input — read JSON from stdin instead of a file (
cat data.json | jsp) - Pipe-friendly — output can be piped to other commands or redirected to files
Planned
- CSV, XML, and YAML support
Tech Stack
- Python
- Rich for colored/syntax-highlighted output
- Typer for argument parsing
Installation
Coming soon — Homebrew tap planned as the first distribution target.
Usage
# Pretty-print a JSON file with syntax highlighting
jsp data.json
# Read JSON from stdin
cat data.json | jsp
# Filter by key
jsp data.json name
# Filter by nested key path
jsp data.json users.0.email
# Modify a value in the output (file is not changed)
jsp data.json --set name=updated
# Delete a key from the output
jsp data.json --del obsoleteField
# Set a key's value from another JSON file
jsp data.json --set config=@overrides.json
# Same thing via stdin pipe
cat overrides.json | jsp data.json --set config=@-
# Output compact JSON (single line, no highlighting)
jsp data.json --compact
jsp data.json -c
# Pipe the result
jsp data.json --set env=prod -c | kubectl apply -f -
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jspprint-0.1.0.tar.gz.
File metadata
- Download URL: jspprint-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
838723a119e78abe80207a2b13477e3d4d1e144dd9ee2967bbbcee028c89ba95
|
|
| MD5 |
62499a6b7c0f816be6c73e48bc6c3950
|
|
| BLAKE2b-256 |
b155bce110abf4c163ab6ae54d52adc92307f1c7b4682063332f328e9427a1bc
|
File details
Details for the file jspprint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jspprint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23272914f5ba567423464eb1af5fceba2077958fd5f715985a7cab5719028bf2
|
|
| MD5 |
4256ff98aabfb4464545b2c03268cc14
|
|
| BLAKE2b-256 |
1b39336ba50655edca91f315cf921077d1807e6a0ca2954f0a86f8262b63d753
|