mirror of
https://gitee.com/shikong-sk/gofiber-study
synced 2025-02-24 15:52:15 +08:00
11 lines
174 B
Go
11 lines
174 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/goccy/go-json"
|
|
)
|
|
|
|
func Json(data interface{}) string {
|
|
jsonBytes, _ := json.MarshalIndent(data, "", " ")
|
|
return string(jsonBytes)
|
|
}
|