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

Method codecDecodeSelfFromArray

benchmark/benchmark_codecgen.go:2095–2148  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

2093
2094// Benchmark harness support for STK-REQ-004.
2095func (x *DSTopic) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
2096 var h codecSelfer6617
2097 z, r := codec1978.GenHelperDecoder(d)
2098 _, _, _ = h, z, r
2099 var yyj6 int
2100 var yyb6 bool
2101 var yyhl6 bool = l >= 0
2102 yyj6++
2103 if yyhl6 {
2104 yyb6 = yyj6 > l
2105 } else {
2106 yyb6 = r.CheckBreak()
2107 }
2108 if yyb6 {
2109 r.ReadArrayEnd()
2110 return
2111 }
2112 r.ReadArrayElem()
2113 if r.TryDecodeAsNil() {
2114 x.Id = 0
2115 } else {
2116 x.Id = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize6617))
2117 }
2118 yyj6++
2119 if yyhl6 {
2120 yyb6 = yyj6 > l
2121 } else {
2122 yyb6 = r.CheckBreak()
2123 }
2124 if yyb6 {
2125 r.ReadArrayEnd()
2126 return
2127 }
2128 r.ReadArrayElem()
2129 if r.TryDecodeAsNil() {
2130 x.Slug = ""
2131 } else {
2132 x.Slug = (string)(r.DecodeString())
2133 }
2134 for {
2135 yyj6++
2136 if yyhl6 {
2137 yyb6 = yyj6 > l
2138 } else {
2139 yyb6 = r.CheckBreak()
2140 }
2141 if yyb6 {
2142 break
2143 }
2144 r.ReadArrayElem()
2145 z.DecStructFieldNotFound(yyj6-1, "")
2146 }
2147 r.ReadArrayEnd()
2148}
2149
2150// Benchmark harness support for STK-REQ-004.
2151func (x *DSTopicsList) CodecEncodeSelf(e *codec1978.Encoder) {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected