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

Method CodecDecodeSelf

benchmark/benchmark_codecgen.go:622–651  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

620
621// Benchmark harness support for STK-REQ-004.
622func (x *CBAvatar) CodecDecodeSelf(d *codec1978.Decoder) {
623 var h codecSelfer6617
624 z, r := codec1978.GenHelperDecoder(d)
625 _, _, _ = h, z, r
626 if false {
627 } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
628 z.DecExtension(x, yyxt1)
629 } else if !z.DecBinary() && z.IsJSONHandle() {
630 z.DecJSONUnmarshal(x)
631 } else {
632 yyct2 := r.ContainerType()
633 if yyct2 == codecSelferValueTypeMap6617 {
634 yyl2 := r.ReadMapStart()
635 if yyl2 == 0 {
636 r.ReadMapEnd()
637 } else {
638 x.codecDecodeSelfFromMap(yyl2, d)
639 }
640 } else if yyct2 == codecSelferValueTypeArray6617 {
641 yyl2 := r.ReadArrayStart()
642 if yyl2 == 0 {
643 r.ReadArrayEnd()
644 } else {
645 x.codecDecodeSelfFromArray(yyl2, d)
646 }
647 } else {
648 panic(errCodecSelferOnlyMapOrArrayEncodeToStruct6617)
649 }
650 }
651}
652
653// Benchmark harness support for STK-REQ-004.
654func (x *CBAvatar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected