https://github.com/caarlos0/jsonfmt
Like gofmt, but for JSON files.
https://github.com/caarlos0/jsonfmt
formatter json
Last synced: 3 months ago
JSON representation
Like gofmt, but for JSON files.
- Host: GitHub
- URL: https://github.com/caarlos0/jsonfmt
- Owner: caarlos0
- License: mit
- Created: 2018-11-07T17:08:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T08:56:28.000Z (3 months ago)
- Last Synced: 2025-03-31T12:04:41.239Z (3 months ago)
- Topics: formatter, json
- Language: Go
- Homepage:
- Size: 157 KB
- Stars: 84
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# jsonfmt
Like `gofmt`, but for JSON files.
Usage: `jsonfmt` or `jsonfmt -w` to autofix the issues.
## Install
**homebrew**:
```sh
brew install caarlos0/tap/jsonfmt
```**docker**:
```sh
docker run -v $PWD:/data --workdir /data caarlos0/jsonfmt -h
```**apt**:
```sh
echo 'deb [trusted=yes] https://repo.caarlos0.dev/apt/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install jsonfmt
```**yum**:
```sh
echo '[caarlos0]
name=caarlos0
baseurl=https://repo.caarlos0.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
sudo yum install jsonfmt
```**deb/rpm**:
Download the `.deb` or `.rpm` from the [releases page][releases] and
install with `dpkg -i` and `rpm -i` respectively.**manually**:
Download the pre-compiled binaries from the [releases page][releases] or
clone the repo build from source.[releases]: https://github.com/caarlos0/jsonfmt/releases
## Stargazers over time
[](https://starchart.cc/caarlos0/jsonfmt)