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

Method MarshalJSONBuf

benchmark/benchmark_ffjson.go:1205–1220  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(buf fflib.EncodingBuffer)

Source from the content-addressed store, hash-verified

1203
1204// Benchmark harness support for STK-REQ-004.
1205func (mj *DSTopic) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
1206 if mj == nil {
1207 buf.WriteString("null")
1208 return nil
1209 }
1210 var err error
1211 var obj []byte
1212 _ = obj
1213 _ = err
1214 buf.WriteString(`{"Id":`)
1215 fflib.FormatBits2(buf, uint64(mj.Id), 10, mj.Id < 0)
1216 buf.WriteString(`,"Slug":`)
1217 fflib.WriteJsonString(buf, string(mj.Slug))
1218 buf.WriteByte('}')
1219 return nil
1220}
1221
1222const (
1223 ffj_t_DSTopicbase = iota

Callers 1

MarshalJSONMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected