Liking cljdoc? Tell your friends :D

com.yetanalytics.pathetic.json-path


instaparse->patheticclj/s

(instaparse->pathetic parsed)
source

is-parse-failure?clj/s

(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.
sourceraw docstring

jsonpath-instaparserclj/s

source

parseclj/s

(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.
sourceraw docstring

parse-firstclj/s

(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.
sourceraw docstring

path->stringclj/s

(path->string parsed-path)

Stringify a parsed path back into a JSONPath string.

Stringify a parsed path back into a JSONPath string.
sourceraw docstring

path-seqsclj/s

(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
sourceraw docstring

speculative-path-seqsclj/s

(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.
sourceraw docstring

test-strict-pathclj/s

(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:

  • Recursive descent operator ("..")
  • Array slices
  • Negative array indices
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 indices
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close