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

Method CodecDecodeSelf

benchmark/benchmark_codecgen.go:786–815  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

784
785// Benchmark harness support for STK-REQ-004.
786func (x *CBGravatar) CodecDecodeSelf(d *codec1978.Decoder) {
787 var h codecSelfer6617
788 z, r := codec1978.GenHelperDecoder(d)
789 _, _, _ = h, z, r
790 if false {
791 } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
792 z.DecExtension(x, yyxt1)
793 } else if !z.DecBinary() && z.IsJSONHandle() {
794 z.DecJSONUnmarshal(x)
795 } else {
796 yyct2 := r.ContainerType()
797 if yyct2 == codecSelferValueTypeMap6617 {
798 yyl2 := r.ReadMapStart()
799 if yyl2 == 0 {
800 r.ReadMapEnd()
801 } else {
802 x.codecDecodeSelfFromMap(yyl2, d)
803 }
804 } else if yyct2 == codecSelferValueTypeArray6617 {
805 yyl2 := r.ReadArrayStart()
806 if yyl2 == 0 {
807 r.ReadArrayEnd()
808 } else {
809 x.codecDecodeSelfFromArray(yyl2, d)
810 }
811 } else {
812 panic(errCodecSelferOnlyMapOrArrayEncodeToStruct6617)
813 }
814 }
815}
816
817// Benchmark harness support for STK-REQ-004.
818func (x *CBGravatar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected