iterArrayValues iterates through all the values of an encoded array without requiring decoding of all of them.
()
| 191 | // iterArrayValues iterates through all the values of an encoded array without |
| 192 | // requiring decoding of all of them. |
| 193 | func (j *jsonEncoded) iterArrayValues() encodedArrayIterator { |
| 194 | if j.typ != ArrayJSONType { |
| 195 | panic("can only iterate through the array values of an array") |
| 196 | } |
| 197 | |
| 198 | return encodedArrayIterator{ |
| 199 | dataOffset: containerHeaderLen + j.containerLen*jEntryLen, |
| 200 | curDataIdx: 0, |
| 201 | len: j.containerLen, |
| 202 | idx: 0, |
| 203 | data: j.value, |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | type encodedObjectIterator struct { |
| 208 | curKeyIdx int |
no outgoing calls
no test coverage detected