MCPcopy Create free account
hub / github.com/buger/jsonparser / parseReaderArrayIndex

Function parseReaderArrayIndex

reader_parser.go:398–404  ·  view source on GitHub ↗

SYS-REQ-116

(key string)

Source from the content-addressed store, hash-verified

396
397// SYS-REQ-116
398func parseReaderArrayIndex(key string) (int, bool) {
399 if len(key) < 3 || key[0] != '[' || key[len(key)-1] != ']' {
400 return 0, false
401 }
402 index, err := strconv.Atoi(key[1 : len(key)-1])
403 return index, err == nil && index >= 0
404}
405
406// SYS-REQ-116
407func (rp *ReaderParser) readObjectKey(wanted string) (bool, error) {

Callers 1

findArrayValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected