JSON Lens CLI: A Lightweight Python Tool for JSON Validation, Formatting and Stats
Managing and inspecting large JSON files can be tedious. Today, I'm releasing JSON Lens CLI (json-lens-cli), an open-source, zero-dependency Python command-line utility designed to make inspecting, validating, formatting, and analyzing JSON files lightning fast.
Features
- Validation: Quickly verify if any JSON file or string is syntactically valid.
- Statistics: Inspect key metrics including total size, number of keys, root type, and maximum nesting depth.
- Pretty Print & Minify: Format raw JSON with custom indentation or compress it for storage and network transmission.
Installation & Usage
You can clone the repository from GitHub:
git clone https://github.com/qtnt2xxx-wq/json-lens-cli.git
cd json-lens-cli
Validate a JSON file
python3 cli.py validate data.json
Inspect JSON Stats
python3 cli.py stats data.json
Format / Pretty Print
python3 cli.py format data.json --indent 4
Open Source & Contribution
The project is completely open source under the MIT License. Contributions, issues, and pull requests are welcome on GitHub!
- GitHub Repository: https://github.com/qtnt2xxx-wq/json-lens-cli
-
Crypto Support (Base / EVM):
0x551a468628F6F35546E11dAcDa3d99EE75E61A8D
Top comments (0)