modulepackage
0.0.0-20210113012101-fb4e108d2519
Repository: https://github.com/jerloo/go-prettyjson.git
Documentation: pkg.go.dev
# README
prettyjson
JSON pretty print for Golang.
Example
v := map[string]interface{}{
"str": "foo",
"num": 100,
"bool": false,
"null": nil,
"array": []string{"foo", "bar", "baz"},
"map": map[string]interface{}{
"foo": "bar",
},
}
s, _ := prettyjson.Marshal(v)
fmt.Println(string(s))
License
MIT
# Functions
Format JSON string with default options.
Marshal JSON data with default options.
NewFormatter returns a new formatter with following default values.