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

Method CodecDecodeSelf

benchmark/benchmark_codecgen.go:1637–1666  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

1635
1636// Benchmark harness support for STK-REQ-004.
1637func (x *MediumPayload) CodecDecodeSelf(d *codec1978.Decoder) {
1638 var h codecSelfer6617
1639 z, r := codec1978.GenHelperDecoder(d)
1640 _, _, _ = h, z, r
1641 if false {
1642 } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
1643 z.DecExtension(x, yyxt1)
1644 } else if !z.DecBinary() && z.IsJSONHandle() {
1645 z.DecJSONUnmarshal(x)
1646 } else {
1647 yyct2 := r.ContainerType()
1648 if yyct2 == codecSelferValueTypeMap6617 {
1649 yyl2 := r.ReadMapStart()
1650 if yyl2 == 0 {
1651 r.ReadMapEnd()
1652 } else {
1653 x.codecDecodeSelfFromMap(yyl2, d)
1654 }
1655 } else if yyct2 == codecSelferValueTypeArray6617 {
1656 yyl2 := r.ReadArrayStart()
1657 if yyl2 == 0 {
1658 r.ReadArrayEnd()
1659 } else {
1660 x.codecDecodeSelfFromArray(yyl2, d)
1661 }
1662 } else {
1663 panic(errCodecSelferOnlyMapOrArrayEncodeToStruct6617)
1664 }
1665 }
1666}
1667
1668// Benchmark harness support for STK-REQ-004.
1669func (x *MediumPayload) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected