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

Method MarshalJSON

benchmark/benchmark_ffjson.go:2603–2614  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

2601
2602// Benchmark harness support for STK-REQ-004.
2603func (mj *SmallPayload) MarshalJSON() ([]byte, error) {
2604 var buf fflib.Buffer
2605 if mj == nil {
2606 buf.WriteString("null")
2607 return buf.Bytes(), nil
2608 }
2609 err := mj.MarshalJSONBuf(&buf)
2610 if err != nil {
2611 return nil, err
2612 }
2613 return buf.Bytes(), nil
2614}
2615
2616// Benchmark harness support for STK-REQ-004.
2617func (mj *SmallPayload) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected