Skip to content

carlmjohnson/json-tidy

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Jan 7, 2016
Jan 2, 2019
Jan 2, 2019

json-tidy GoDoc Go Report Card

Pretty prints JSON

Installation

First install Go.

If you just want to install the binary to your current directory and don't care about the source code, run

GOBIN=$(pwd) GOPATH=$(mktemp -d) go get github.com/carlmjohnson/json-tidy

Screenshots

$ json-tidy -h
Gets input files and URLs (defaults to stdin) and outputs tidy JSON.

Usage of json-tidy:

json-tidy [opts] <file|url|->...
  -html-safe
        Escape special characters for easy embedding in HTML
  -indent string
        Identation string (default "\t")
  -output file
        write tidy JSON to file (default stdout)
  -prefix string
        Prefix string
$ echo '{"a": 1, "b": [true, false]}' | json-tidy
{
        "a": 1,
        "b": [
                true,
                false
        ]
}

About

Pretty prints JSON from stdin, files, or URLs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages