MCPcopy Create free account
hub / github.com/pingcap/tidb / MarshalJSON

Method MarshalJSON

pkg/types/json_binary.go:151–154  ·  view source on GitHub ↗

MarshalJSON implements the json.Marshaler interface.

()

Source from the content-addressed store, hash-verified

149
150// MarshalJSON implements the json.Marshaler interface.
151func (bj BinaryJSON) MarshalJSON() ([]byte, error) {
152 buf := make([]byte, 0, len(bj.Value)*3/2)
153 return bj.marshalTo(buf)
154}
155
156func (bj BinaryJSON) marshalTo(buf []byte) ([]byte, error) {
157 switch bj.TypeCode {

Callers 1

StringMethod · 0.95

Calls 1

marshalToMethod · 0.95

Tested by

no test coverage detected