MCPcopy
hub / github.com/mislav/hub / stateKey

Function stateKey

utils/json.go:18–30  ·  view source on GitHub ↗
(s *state)

Source from the content-addressed store, hash-verified

16}
17
18func stateKey(s *state) string {
19 k := ""
20 if s.parentState != nil {
21 k = stateKey(s.parentState)
22 }
23 if s.isObject {
24 return fmt.Sprintf("%s.%s", k, s.objectKey)
25 } else if s.isArray {
26 return fmt.Sprintf("%s.[%d]", k, s.arrayIndex)
27 } else {
28 return k
29 }
30}
31
32func JSONPath(out io.Writer, src io.Reader, colorize bool) (hasNextPage bool, endCursor string) {
33 dec := json.NewDecoder(src)

Callers 1

JSONPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…