A docker image for json: [http://trentm.com/json/]
Use this Docker image from the command line in the same way you would with json.
First build the image:
docker build -t json .
Now use the image to call json with docker run -i --rm json:
Version check:
docker run -i --rm json
Grouping:
echo '{"a":1}
{"b": 2}' | docker run -i --rm json -g
Itemizing:
echo '[{"name":"trent","age":38},
{"name":"ewan","age":4}]' | docker run -i --rm json -a name age
Add this to your .bashrc or .zshrc file:
alias json='docker run -i --rm json'
The lateset version of this image is published to the Docker Hub. You can use it like this:
docker pull chorrell/json:latest
docker run -i --rm chorrell/json:latest
And setup an alias like this:
alias json='docker run -i --rm chorrell/json:latest'
The lateset version of this image is published to the GitHub Container Registry. You can use it like this:
docker pull ghcr.io/chorrell/json:latest
docker run -i --rm ghcr.io/chorrell/json:latest
And setup an alias like this:
alias json='docker run -i --rm ghcr.io/chorrell/json:latest'
Content type
Image
Digest
sha256:1a5187b8b…
Size
48.7 MB
Last updated
6 days ago
docker pull chorrell/json