MCPcopy Create free account
hub / github.com/buger/jsonparser / MarshalJSON

Method MarshalJSON

benchmark/benchmark_ffjson.go:16–27  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

14
15// Benchmark harness support for STK-REQ-004.
16func (mj *CBAvatar) MarshalJSON() ([]byte, error) {
17 var buf fflib.Buffer
18 if mj == nil {
19 buf.WriteString("null")
20 return buf.Bytes(), nil
21 }
22 err := mj.MarshalJSONBuf(&buf)
23 if err != nil {
24 return nil, err
25 }
26 return buf.Bytes(), nil
27}
28
29// Benchmark harness support for STK-REQ-004.
30func (mj *CBAvatar) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected