Liking cljdoc? Tell your friends :D

com.vadelabs.toon.decode.decoders

Root dispatchers for TOON format decoding.

This namespace provides the main entry points for decoding TOON content, dispatching to specialized decoders for arrays, objects, and primitives.

Root dispatchers for TOON format decoding.

This namespace provides the main entry points for decoding TOON content,
dispatching to specialized decoders for arrays, objects, and primitives.
raw docstring

array-from-headerclj/s

(array-from-header header-info cursor depth)
(array-from-header header-info cursor depth strict)

Decodes an array based on its header format.

Dispatches to the appropriate decoder:

  • Inline values → arrays/inline-primitive-array
  • Fields present → arrays/tabular-array
  • Otherwise → arrays/list-array

Parameters:

  • header-info: Parsed array header map
  • cursor: LineCursor positioned after header
  • depth: Expected depth for array content
  • strict: Enable strict mode validation

Returns: [decoded-array, new-cursor]

Decodes an array based on its header format.

Dispatches to the appropriate decoder:
- Inline values → arrays/inline-primitive-array
- Fields present → arrays/tabular-array
- Otherwise → arrays/list-array

Parameters:
  - header-info: Parsed array header map
  - cursor: LineCursor positioned after header
  - depth: Expected depth for array content
  - strict: Enable strict mode validation

Returns:
  [decoded-array, new-cursor]
sourceraw docstring

value-from-linesclj/s

(value-from-lines cursor _indent strict)

Decodes TOON content from parsed lines (root dispatcher).

Determines the root form type and dispatches to appropriate decoder:

  • Array header → array-from-header
  • Single non-key-value line → parser/primitive-token
  • Otherwise → objects/object

Parameters:

  • cursor: LineCursor starting at first line
  • indent: Indent size for parsing
  • strict: Enable strict mode validation

Returns: Decoded Clojure value

Decodes TOON content from parsed lines (root dispatcher).

Determines the root form type and dispatches to appropriate decoder:
- Array header → array-from-header
- Single non-key-value line → parser/primitive-token
- Otherwise → objects/object

Parameters:
  - cursor: LineCursor starting at first line
  - indent: Indent size for parsing
  - strict: Enable strict mode validation

Returns:
  Decoded Clojure value
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