(get-child loc k)
Returns the child of loc at k or nil if key not present. Will skip map-entries entirely, like clojure.core/get
Returns the child of loc at k or nil if key not present. Will skip map-entries entirely, like clojure.core/get
(get-child-in loc key-path)
Like clojure.core/get-in, but for zipper structures.
Like clojure.core/get-in, but for zipper structures.
(internal? loc)
Is a location internal, ie a map entry or key
Is a location internal, ie a map entry or key
(json->path-map json)
given some json, return a map of full paths to values
given some json, return a map of full paths to values
(json-zip root)
Produce a zipper for the JSON
Produce a zipper for the JSON
(loc-in root key-path)
Convenience, like get-child-in, but it takes root and returns a loc or nil.
Convenience, like get-child-in, but it takes root and returns a loc or nil.
(prune loc)
Remove the current node, if it is a value in a map entry also remove the parent. Shouldn't get called on root
Remove the current node, if it is a value in a map entry also remove the parent. Shouldn't get called on root
(stub-in loc key-path)
Given a loc an key path, stub out the path if it does not exist, returning a loc for the destination. If the loc does not exist, it will have the value ::stub. If incorrect keys are given for the data, will throw. If stub-in encounters an intermediate node of ::stub, it will replce it with the proper datastructure for the key path.
Given a loc an key path, stub out the path if it does not exist, returning a loc for the destination. If the loc does not exist, it will have the value ::stub. If incorrect keys are given for the data, will throw. If stub-in encounters an intermediate node of ::stub, it will replce it with the proper datastructure for the key path.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close