Liking cljdoc? Tell your friends :D

com.yetanalytics.pathetic.json

Specs and util functions for JSON value representations.

Specs and util functions for JSON value representations.
raw docstring

jassocclj/s

(jassoc coll k v)

Like assoc, but with the following differences:

  • Automatically dispatches on the type of k for colls. If k is a string, we assoc the key-val pair to a map, otherwise we assoc it to a vector.
  • If coll is a scalar or is the wrong coll, (e.g. a map with a vector key), we overwrite the original coll.
  • If the vector index is out of bounds, we increase the size of the vector, filling in skipped entries with nils.
Like `assoc`, but with the following differences:
- Automatically dispatches on the type of k for colls.
  If k is a string, we assoc the key-val pair to a map,
  otherwise we assoc it to a vector.
- If coll is a scalar or is the wrong coll, (e.g. a map
  with a vector key), we overwrite the original coll.
- If the vector index is out of bounds, we increase the size
  of the vector, filling in skipped entries with nils.
sourceraw docstring

jassoc-inclj/s

(jassoc-in m [k & ks] v)

Like assoc-in, but for jassoc. Returns v if the keys seq is empty.

Like `assoc-in`, but for `jassoc`. Returns `v` if the keys seq is
empty.
sourceraw docstring

recursive-descentclj/s

(recursive-descent json)

Perform the recursive descent operation (".." in JSONPath syntax). Returns all possible sub-structures of a JSON data structure.

Perform the recursive descent operation (".." in JSONPath syntax).
Returns all possible sub-structures of a JSON data structure.
sourceraw docstring

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

× close