MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / allPathsWithDepth

Method allPathsWithDepth

pkg/util/json/json.go:146–146  ·  view source on GitHub ↗

allPathsWithDepth returns a slice of new JSON documents, each a path through the receiver. The depth parameter specifies the maximum depth of the paths to return. If the depth is negative, all paths of any depth are returned. If the depth is 0, the receiver itself is returned. Note that leaves inclu

(depth int)

Source from the content-addressed store, hash-verified

144 // returned. If the depth is 0, the receiver itself is returned. Note that
145 // leaves include the empty object and array in addition to scalars.
146 allPathsWithDepth(depth int) ([]JSON, error)
147
148 // FetchValKey implements the `->` operator for strings, returning nil if the
149 // key is not found.

Callers 5

allPathsWithDepthMethod · 0.65
AllPathsFunction · 0.65
AllPathsWithDepthFunction · 0.65
allPathsWithDepthMethod · 0.65
allPathsWithDepthMethod · 0.65

Implementers 4

jsonNullpkg/util/json/json.go
jsonFalsepkg/util/json/json.go
jsonTruepkg/util/json/json.go
jsonEncodedpkg/util/json/encoded.go

Calls

no outgoing calls

Tested by

no test coverage detected