Liking cljdoc? Tell your friends :D

c3kit.apron.schema.path

Coordinate-based traversal of schemas and data. The grammar matches what schema/message-seq produces:

  • dot-separated keyword keys: a.b.c
  • [N] for seq indices: points[0]
  • ["..."] for string keys: crew["bill"]
  • [:kw] for explicit keywords: a[:joe]

For schemas, two reserved segment names provide access to dynamic templates:

  • :value — the :value-spec of a :map, or the :spec of a :seq
  • :key — the :key-spec of a :map

If the spec has no matching template (e.g. a :map with no :value-spec), :value and :key fall back to ordinary field lookup in :schema.

schema-at walks a schema tree (template semantics). data-at walks concrete data (supports an optional :lenient? option for keyword/string key equivalence).

Coordinate-based traversal of schemas and data. The grammar matches
what schema/message-seq produces:

- dot-separated keyword keys:    a.b.c
- [N] for seq indices:            points[0]
- ["..."] for string keys:       crew["bill"]
- [:kw] for explicit keywords:    a[:joe]

For schemas, two reserved segment names provide access to dynamic
templates:
- :value  — the :value-spec of a :map, or the :spec of a :seq
- :key    — the :key-spec of a :map

If the spec has no matching template (e.g. a :map with no :value-spec),
:value and :key fall back to ordinary field lookup in :schema.

schema-at walks a schema tree (template semantics).
data-at walks concrete data (supports an optional :lenient? option
for keyword/string key equivalence).
raw docstring

data-atclj/s

(data-at data path)
(data-at data path {:keys [lenient?] :or {lenient? false}})

Walk data along a path and return the value at that location. Returns nil for missing keys.

Options: :lenient? when true, a keyword path segment matches a string key of the same name (or an integer key whose decimal form matches). Default false.

Walk data along a path and return the value at that location. Returns
nil for missing keys.

Options:
  :lenient?  when true, a keyword path segment matches a string key of
             the same name (or an integer key whose decimal form
             matches). Default false.
raw docstring

parseclj/s

(parse path)

schema-atclj/s

(schema-at schema path)

unparseclj/s

(unparse segments)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close