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

Method MarshalJSON

benchmark/benchmark_ffjson.go:2271–2282  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

2269
2270// Benchmark harness support for STK-REQ-004.
2271func (mj *MediumPayload) MarshalJSON() ([]byte, error) {
2272 var buf fflib.Buffer
2273 if mj == nil {
2274 buf.WriteString("null")
2275 return buf.Bytes(), nil
2276 }
2277 err := mj.MarshalJSONBuf(&buf)
2278 if err != nil {
2279 return nil, err
2280 }
2281 return buf.Bytes(), nil
2282}
2283
2284// Benchmark harness support for STK-REQ-004.
2285func (mj *MediumPayload) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected