Skip to content

gbvkUtilities/json-formatter-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JSON Formatter CLI 🛠️

License Python

A lightweight, zero-dependency Python tool to prettify, minify, and validate JSON files directly from your terminal.

💡 Philosophy

While tools like jq are powerful, they often require external installation. This tool is designed to work anywhere Python is available, using only built-in modules.

🚀 Features

  • Prettify: Transform dense JSON into human-readable, indented text.
  • Minify: Compress JSON for use in payloads and configuration files.
  • Validate: Catch syntax errors and malformed JSON instantly.
  • Piping Support: Works seamlessly with stdin and stdout.

📖 Usage

Prettify

python3 json_formatter.py data.json

Minify

python3 json_formatter.py data.json --minify

Piping from cURL

curl -s https://api.github.com/users/github | python3 json_formatter.py -

📜 License

MIT License.

About

No description or website provided.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages