MCPcopy
hub / github.com/LyricTian/gin-admin / MarshalToString

Function MarshalToString

pkg/encoding/json/json.go:18–25  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

16)
17
18func MarshalToString(v interface{}) string {
19 s, err := jsoniter.MarshalToString(v)
20 if err != nil {
21 fmt.Println("Failed to marshal json string: " + err.Error())
22 return ""
23 }
24 return s
25}

Callers 1

StringMethod · 0.92

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected