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

Function MarshalJSON

marshal.go:42–47  ·  view source on GitHub ↗

MarshalJSON abstracts the underlying json lib used

(v interface{})

Source from the content-addressed store, hash-verified

40
41// MarshalJSON abstracts the underlying json lib used
42func MarshalJSON(v interface{}) ([]byte, error) {
43 if JSONImpl != nil && JSONImpl.GetManagerOptions()["jsonImpl"] != "std" {
44 return JSONImpl.Marshal(v)
45 }
46 return json.Marshal(v)
47}
48
49func registerCustomJSONEncoders() {
50 // adding all the custom encoders that bleve has implemented,

Callers 7

StatsMethod · 0.85
documentMatchHandlerMethod · 0.85
SearchMethod · 0.85
ServeHTTPMethod · 0.85
SearchInContextMethod · 0.85
HandleTaskMethod · 0.85
QueryMethod · 0.85

Calls 2

GetManagerOptionsMethod · 0.80
MarshalMethod · 0.80

Tested by

no test coverage detected