Skip to content

caarlos0/jsonfmt

Repository files navigation

jsonfmt

Like gofmt, but for JSON files.

Usage: jsonfmt or jsonfmt -w to autofix the issues.

Install

homebrew:

brew install caarlos0/tap/jsonfmt

docker:

docker run -v $PWD:/data --workdir /data caarlos0/jsonfmt -h

apt:

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:

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 and install with dpkg -i and rpm -i respectively.

manually:

Download the pre-compiled binaries from the releases page or clone the repo build from source.

Stargazers over time

Stargazers over time