go-jsonpp/sprettyprint.go

17 lines
201 B
Go
Raw Permalink Normal View History

2023-09-27 04:45:47 +00:00
package jsonpp
import (
"bytes"
)
func SPrettyPrint(json []byte) string {
var buffer bytes.Buffer
err := jsonPrettyPrint(&buffer, json)
if nil != err {
return ""
}
return buffer.String()
}