HandleArrayValues runs handler.HandleArrayValue on each item in the array at the beginning of data until it encounters an error or reaches the end of the array. p is the position after the last byte it read. When err is nil, p will be the position after the object. buffer is optional. Reusing a buff
(data []byte, handler ArrayValueHandler, buffer *Buffer)
| 61 | // be the position after the object. |
| 62 | // buffer is optional. Reusing a buffer can reduce memory allocations. |
| 63 | func HandleArrayValues(data []byte, handler ArrayValueHandler, buffer *Buffer) (p int, err error) { |
| 64 | if buffer == nil { |
| 65 | p, _, err = handleArrayValues(data, handler, nil) |
| 66 | return p, err |
| 67 | } |
| 68 | p, buffer.stackBuf, err = handleArrayValues(data, handler, buffer.stackBuf) |
| 69 | return p, err |
| 70 | } |
| 71 | |
| 72 | // SkipValue skips the first json value in data. p is the position after the skipped value. |
| 73 | // buffer is optional. Reusing a buffer can reduce memory allocations. |
no test coverage detected
searching dependent graphs…