Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hokaccha/go-prettyjson

JSON pretty print for Golang.
https://github.com/hokaccha/go-prettyjson

Last synced: 7 days ago
JSON representation

JSON pretty print for Golang.

Awesome Lists containing this project

README

        

# prettyjson

JSON pretty print for Golang.

## Example

```go
import "github.com/hokaccha/go-prettyjson"

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))
```

![Output](http://i.imgur.com/cUFj5os.png)

## License

MIT