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

Method MarshalJSON

benchmark/benchmark_ffjson.go:1944–1955  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

1942
1943// Benchmark harness support for STK-REQ-004.
1944func (mj *LargePayload) MarshalJSON() ([]byte, error) {
1945 var buf fflib.Buffer
1946 if mj == nil {
1947 buf.WriteString("null")
1948 return buf.Bytes(), nil
1949 }
1950 err := mj.MarshalJSONBuf(&buf)
1951 if err != nil {
1952 return nil, err
1953 }
1954 return buf.Bytes(), nil
1955}
1956
1957// Benchmark harness support for STK-REQ-004.
1958func (mj *LargePayload) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected