Liking cljdoc? Tell your friends :D

com.vadelabs.toon.decode.arrays

Array decoding for TOON format.

Handles inline, tabular, and list array formats.

Array decoding for TOON format.

Handles inline, tabular, and list array formats.
raw docstring

inline-primitive-arrayclj/s

(inline-primitive-array header-info)
(inline-primitive-array {:keys [inline-values delimiter length]} strict)

Decodes an inline primitive array.

Format: [3]: a,b,c

Parameters:

  • header-info: Map from parse-array-header-line
  • strict: Enable strict mode validation (default true)

Returns: Vector of parsed primitive values

Strict mode validates:

  • Array length matches header
Decodes an inline primitive array.

Format: [3]: a,b,c

Parameters:
  - header-info: Map from parse-array-header-line
  - strict: Enable strict mode validation (default true)

Returns:
  Vector of parsed primitive values

Strict mode validates:
  - Array length matches header
sourceraw docstring

list-arrayclj/s

(list-array {:keys [length delimiter]} cursor depth strict list-item-fn)

Decodes a list-format array.

Format: [3]: - item1 - item2 - item3

Parameters:

  • header-info: Map from parse-array-header-line
  • cursor: LineCursor positioned after header
  • depth: Expected depth for items
  • strict: Enable strict mode validation
  • list-item-fn: Function to decode list items (for dependency injection)

Returns: [decoded-items, new-cursor]

Strict mode validates:

  • Item count matches header length
  • No extra items after expected count
Decodes a list-format array.

Format:
  [3]:
    - item1
    - item2
    - item3

Parameters:
  - header-info: Map from parse-array-header-line
  - cursor: LineCursor positioned after header
  - depth: Expected depth for items
  - strict: Enable strict mode validation
  - list-item-fn: Function to decode list items (for dependency injection)

Returns:
  [decoded-items, new-cursor]

Strict mode validates:
  - Item count matches header length
  - No extra items after expected count
sourceraw docstring

list-itemclj/s

source

tabular-arrayclj/s

(tabular-array header-info cursor depth)
(tabular-array {:keys [fields delimiter length]} cursor depth strict)

Decodes a tabular array into objects.

Format: [2]{id,name}: 1,Alice 2,Bob

Parameters:

  • header-info: Map from parse-array-header-line
  • cursor: LineCursor positioned after header
  • depth: Expected depth for rows
  • strict: Enable strict mode validation

Returns: [decoded-objects, new-cursor]

Strict mode validates:

  • Row count matches header length
  • No extra rows after expected count
Decodes a tabular array into objects.

Format:
  [2]{id,name}:
    1,Alice
    2,Bob

Parameters:
  - header-info: Map from parse-array-header-line
  - cursor: LineCursor positioned after header
  - depth: Expected depth for rows
  - strict: Enable strict mode validation

Returns:
  [decoded-objects, new-cursor]

Strict mode validates:
  - Row count matches header length
  - No extra rows after expected count
sourceraw docstring

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