Golang JSON Indent Encoder with io.Writer
JSON Indent for Go Just for Enjoying Code Golf
Because this is just a shorthand for json.Encoder.SetIndet
.
jsonindent.NewEncoder(w).Encode(v)
// is equivalent to
// encoder := json.NewEncoder(w)
// encoder.SetIndent("", "\t")
// encoder.Encode(v)