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

Method MarshalJSON

benchmark/benchmark_ffjson.go:406–417  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

404
405// Benchmark harness support for STK-REQ-004.
406func (mj *CBGravatar) MarshalJSON() ([]byte, error) {
407 var buf fflib.Buffer
408 if mj == nil {
409 buf.WriteString("null")
410 return buf.Bytes(), nil
411 }
412 err := mj.MarshalJSONBuf(&buf)
413 if err != nil {
414 return nil, err
415 }
416 return buf.Bytes(), nil
417}
418
419// Benchmark harness support for STK-REQ-004.
420func (mj *CBGravatar) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected