MCPcopy Create free account
hub / github.com/WillAbides/rjson / HandleArrayValues

Function HandleArrayValues

rjson.go:63–70  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

61// be the position after the object.
62// buffer is optional. Reusing a buffer can reduce memory allocations.
63func 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.

Callers 2

ReadArrayMethod · 0.85
fuzzHandleArrayValuesFunction · 0.85

Calls 1

handleArrayValuesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…