MCPcopy
hub / github.com/cortexlabs/cortex / MarshalJSONStr

Function MarshalJSONStr

pkg/lib/json/json.go:61–67  ·  view source on GitHub ↗
(obj interface{})

Source from the content-addressed store, hash-verified

59}
60
61func MarshalJSONStr(obj interface{}) (string, error) {
62 jsonBytes, err := Marshal(obj)
63 if err != nil {
64 return "", err
65 }
66 return string(jsonBytes), nil
67}
68
69func WriteJSON(obj interface{}, outPath string) error {
70 jsonBytes, err := Marshal(obj)

Callers

nothing calls this directly

Calls 1

MarshalFunction · 0.70

Tested by

no test coverage detected