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

Method CodecDecodeSelf

benchmark/benchmark_codecgen.go:948–977  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

946
947// Benchmark harness support for STK-REQ-004.
948func (x *CBGithub) CodecDecodeSelf(d *codec1978.Decoder) {
949 var h codecSelfer6617
950 z, r := codec1978.GenHelperDecoder(d)
951 _, _, _ = h, z, r
952 if false {
953 } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
954 z.DecExtension(x, yyxt1)
955 } else if !z.DecBinary() && z.IsJSONHandle() {
956 z.DecJSONUnmarshal(x)
957 } else {
958 yyct2 := r.ContainerType()
959 if yyct2 == codecSelferValueTypeMap6617 {
960 yyl2 := r.ReadMapStart()
961 if yyl2 == 0 {
962 r.ReadMapEnd()
963 } else {
964 x.codecDecodeSelfFromMap(yyl2, d)
965 }
966 } else if yyct2 == codecSelferValueTypeArray6617 {
967 yyl2 := r.ReadArrayStart()
968 if yyl2 == 0 {
969 r.ReadArrayEnd()
970 } else {
971 x.codecDecodeSelfFromArray(yyl2, d)
972 }
973 } else {
974 panic(errCodecSelferOnlyMapOrArrayEncodeToStruct6617)
975 }
976 }
977}
978
979// Benchmark harness support for STK-REQ-004.
980func (x *CBGithub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected