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

Function Marshal

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

Source from the content-addressed store, hash-verified

34}
35
36func Marshal(obj interface{}) ([]byte, error) {
37 jsonBytes, err := json.Marshal(obj)
38 if err != nil {
39 return nil, errors.Wrap(err, errStrMarshalJSON)
40 }
41 return jsonBytes, nil
42}
43
44func Unmarshal(jsonBytes []byte, dst interface{}) error {
45 if err := json.Unmarshal(jsonBytes, dst); err != nil {

Callers 6

AwakenMethod · 0.92
UploadJSONToS3Method · 0.92
StringMethod · 0.92
HTTPPostObjAsJSONFunction · 0.92
MarshalJSONStrFunction · 0.70
WriteJSONFunction · 0.70

Calls 1

WrapFunction · 0.92

Tested by

no test coverage detected