jsonf
Console tool for highlighted formatting and struct query fetching JSON
About jsonf
Console JSON formatter with query feature.
Install:
$ go get github.com/miolini/jsonf
Usage:
Usage of jsonf:
-c=true: colorize output
-d=false: debug output to stderr
-f=true: format output json to stdout
-q="": json query
-s=true: syntax hightlight
-v=false: verbose output to stderr
Examples:
$ echo '{"uid":1,"email":"[email protected]","address":{"city":"New-York","country":"US"}}' | jsonf

$ echo '{"uid":1,"email":"[email protected]","address":{"city":"New-York","country":"US"}}' \
| jsonf -q 'value["address"]["country"]'
"US"
Using from another Golang program
import (
...
"github.com/miolini/jsonf/jsonflib"
...
)
...
jsonRaw, err := jsonflib.Highlight(
jsonRaw,
jsonflib.HighlightFlags{Colorize: true, Verbose: false, Debug: false},
)
if err != nil {
return err
}
Frequently Asked Questions
What is jsonf?
jsonf is a JSON library for the Go programming language. Console tool for highlighted formatting and struct query fetching JSON
How do I install jsonf?
Install jsonf with the Go module system using `go get miolini/jsonf`. Check the repository for the current installation instructions.
What category does jsonf belong to?
jsonf is listed under JSON, specifically JSON.