(is-parse-failure? x)Returns true if the given object is error data from a parse failure, false otherwise.
Returns true if the given object is error data from a parse failure, false otherwise.
(parse jsonpath-str)Given a JSON-path, parse it into data. Returns a vector of parsed JSON-paths, or the first error map if one or more paths are invalid.
Given a JSON-path, parse it into data. Returns a vector of parsed JSON-paths, or the first error map if one or more paths are invalid.
(parse-first jsonpath-str)Same as parse, but returns the first parsed JSON-path, or nil
if the paths are invalid.
Same as `parse`, but returns the first parsed JSON-path, or `nil` if the paths are invalid.
(path->string parsed-path)Stringify a parsed path back into a JSONPath string.
Stringify a parsed path back into a JSONPath string.
(path-seqs json-obj json-path)Given a JSON object and a parsed JSONPath, return a seq of maps with the following fields: :json the JSON value at the JSONPath location. :path the definite JSONPath that was traversed. :fail if the JSONPath traversal failed due to missing keys or indices
Given a JSON object and a parsed JSONPath, return a seq of
maps with the following fields:
:json the JSON value at the JSONPath location.
:path the definite JSONPath that was traversed.
:fail if the JSONPath traversal failed due to missing
keys or indices(speculative-path-seqs json-obj json-path)Similar to path-seqs, except it continues traversing the path even if the location in the JSON data is missing or incompatible. Returns the same fields as path-seqs except for :fail.
Similar to path-seqs, except it continues traversing the path even if the location in the JSON data is missing or incompatible. Returns the same fields as path-seqs except for :fail.
(test-strict-path parsed-path)Test if a parsed path is valid in strict mode. If so, returns nil; if not, then returns the first non-strict element, which is any one of the following:
Test if a parsed path is valid in strict mode. If so, returns
nil; if not, then returns the first non-strict element, which
is any one of the following:
- Recursive descent operator ("..")
- Array slices
- Negative array indicescljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |