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

Method MarshalJSON

benchmark/benchmark_ffjson.go:1751–1762  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

()

Source from the content-addressed store, hash-verified

1749
1750// Benchmark harness support for STK-REQ-004.
1751func (mj *DSUser) MarshalJSON() ([]byte, error) {
1752 var buf fflib.Buffer
1753 if mj == nil {
1754 buf.WriteString("null")
1755 return buf.Bytes(), nil
1756 }
1757 err := mj.MarshalJSONBuf(&buf)
1758 if err != nil {
1759 return nil, err
1760 }
1761 return buf.Bytes(), nil
1762}
1763
1764// Benchmark harness support for STK-REQ-004.
1765func (mj *DSUser) MarshalJSONBuf(buf fflib.EncodingBuffer) error {

Callers

nothing calls this directly

Calls 1

MarshalJSONBufMethod · 0.95

Tested by

no test coverage detected