jsonfmt

Formats and validates JSON files with consistent indentation

brewmacoslinux
Try with needOr install directly
Source

About

Like gofmt, but for JSON files

Commands

jsonfmt

Examples

Format a JSON file and output to stdout$ jsonfmt file.json
Format a JSON file in-place$ jsonfmt -w file.json
Format with custom indentation (2 spaces)$ jsonfmt -i 2 file.json