MCPcopy Create free account
hub / github.com/convox/rack / stripJSON

Function stripJSON

pkg/test/handler_func.go:108–121  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

106}
107
108func stripJSON(data []byte) ([]byte, error) {
109 var obj interface{}
110
111 if err := json.Unmarshal(data, &obj); err != nil {
112 return nil, err
113 }
114
115 strip, err := json.Marshal(obj)
116 if err != nil {
117 return nil, err
118 }
119
120 return strip, nil
121}

Callers 1

AssertJSONMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected