MCPcopy
hub / github.com/spf13/cast / jsonStringToObject

Function jsonStringToObject

map.go:209–212  ·  view source on GitHub ↗

jsonStringToObject attempts to unmarshall a string as JSON into the object passed as pointer.

(s string, v any)

Source from the content-addressed store, hash-verified

207// jsonStringToObject attempts to unmarshall a string as JSON into
208// the object passed as pointer.
209func jsonStringToObject(s string, v any) error {
210 data := []byte(s)
211 return json.Unmarshal(data, v)
212}

Callers 3

toMapEFunction · 0.85
ToStringMapStringSliceEFunction · 0.85
toStringMapIntEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…