MCPcopy Create free account
hub / github.com/couchbase/cbft / Encode

Method Encode

marshal.go:37–39  ·  view source on GitHub ↗

Encode abstracts the underlying json lib used

(w io.Writer, v interface{})

Source from the content-addressed store, hash-verified

35
36// Encode abstracts the underlying json lib used
37func (p *CustomJSONImpl) Encode(w io.Writer, v interface{}) error {
38 return jsoniter.ConfigCompatibleWithStandardLibrary.NewEncoder(w).Encode(v)
39}
40
41// MarshalJSON abstracts the underlying json lib used
42func MarshalJSON(v interface{}) ([]byte, error) {

Callers 2

MustEncodeWithParserFunction · 0.80
mustEncodeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected