11 lines
172 B
Go
11 lines
172 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"github.com/goccy/go-json"
|
||
|
)
|
||
|
|
||
|
func Json(data interface{}) string {
|
||
|
jsonBytes, _ := json.MarshalIndent(data, "", " ")
|
||
|
return string(jsonBytes)
|
||
|
}
|