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

Method MarshalJSON

benchmark/benchmark_ffjson.go:864–875  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

862
863// Benchmark harness support for STK-REQ-004.
864func (mj *CBPerson) MarshalJSON() ([]byte, error) {
865 var buf fflib.Buffer
866 if mj == nil {
867 buf.WriteString("null")
868 return buf.Bytes(), nil
869 }
870 err := mj.MarshalJSONBuf(&buf)
871 if err != nil {
872 return nil, err
873 }
874 return buf.Bytes(), nil
875}
876
877// Benchmark harness support for STK-REQ-004.
878func (mj *CBPerson) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected