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

Method CodecDecodeSelf

benchmark/benchmark_codecgen.go:2237–2266  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

2235
2236// Benchmark harness support for STK-REQ-004.
2237func (x *DSTopicsList) CodecDecodeSelf(d *codec1978.Decoder) {
2238 var h codecSelfer6617
2239 z, r := codec1978.GenHelperDecoder(d)
2240 _, _, _ = h, z, r
2241 if false {
2242 } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
2243 z.DecExtension(x, yyxt1)
2244 } else if !z.DecBinary() && z.IsJSONHandle() {
2245 z.DecJSONUnmarshal(x)
2246 } else {
2247 yyct2 := r.ContainerType()
2248 if yyct2 == codecSelferValueTypeMap6617 {
2249 yyl2 := r.ReadMapStart()
2250 if yyl2 == 0 {
2251 r.ReadMapEnd()
2252 } else {
2253 x.codecDecodeSelfFromMap(yyl2, d)
2254 }
2255 } else if yyct2 == codecSelferValueTypeArray6617 {
2256 yyl2 := r.ReadArrayStart()
2257 if yyl2 == 0 {
2258 r.ReadArrayEnd()
2259 } else {
2260 x.codecDecodeSelfFromArray(yyl2, d)
2261 }
2262 } else {
2263 panic(errCodecSelferOnlyMapOrArrayEncodeToStruct6617)
2264 }
2265 }
2266}
2267
2268// Benchmark harness support for STK-REQ-004.
2269func (x *DSTopicsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected