MCPcopy
hub / github.com/tidwall/gjson / modToStr

Function modToStr

gjson.go:3247–3249  ·  view source on GitHub ↗

@tostr converts a string to json {"id":1023,"name":"alert"} -> "{\"id\":1023,\"name\":\"alert\"}"

(str, arg string)

Source from the content-addressed store, hash-verified

3245//
3246// {"id":1023,"name":"alert"} -> "{\"id\":1023,\"name\":\"alert\"}"
3247func modToStr(str, arg string) string {
3248 return string(AppendJSONString(nil, str))
3249}
3250
3251func modGroup(json, arg string) string {
3252 res := Parse(json)

Callers

nothing calls this directly

Calls 1

AppendJSONStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…