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

Method MarshalJSON

benchmark/benchmark_ffjson.go:1191–1202  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

1189
1190// Benchmark harness support for STK-REQ-004.
1191func (mj *DSTopic) MarshalJSON() ([]byte, error) {
1192 var buf fflib.Buffer
1193 if mj == nil {
1194 buf.WriteString("null")
1195 return buf.Bytes(), nil
1196 }
1197 err := mj.MarshalJSONBuf(&buf)
1198 if err != nil {
1199 return nil, err
1200 }
1201 return buf.Bytes(), nil
1202}
1203
1204// Benchmark harness support for STK-REQ-004.
1205func (mj *DSTopic) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected