iterArrayValues iterates through all the values of an encoded array without requiring decoding of all of them.
()
| 208 | // iterArrayValues iterates through all the values of an encoded array without |
| 209 | // requiring decoding of all of them. |
| 210 | func (j *jsonEncoded) iterArrayValues() encodedArrayIterator { |
| 211 | if j.typ != ArrayJSONType { |
| 212 | panic("can only iterate through the array values of an array") |
| 213 | } |
| 214 | |
| 215 | return encodedArrayIterator{ |
| 216 | dataOffset: containerHeaderLen + j.containerLen*jEntryLen, |
| 217 | curDataIdx: 0, |
| 218 | len: j.containerLen, |
| 219 | idx: 0, |
| 220 | data: j.value, |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | type encodedObjectIterator struct { |
| 225 | curKeyIdx int |
no outgoing calls
no test coverage detected