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