Liking cljdoc? Tell your friends :D
All platforms.

com.vadelabs.toon.decode.keys

Key manipulation utilities for TOON decoding.

Provides functions to expand dotted keys into nested objects.

Key manipulation utilities for TOON decoding.

Provides functions to expand dotted keys into nested objects.
raw docstring

expandclj/s

(expand value strict expand-paths)

Expands dotted keys into nested objects in safe mode.

Recursively traverses a decoded TOON value and expands any keys containing dots (.) into nested object structures, provided all segments are valid identifiers.

Expansion rules:

  • Keys containing dots are split into segments
  • All segments must pass identifier validation
  • Non-eligible keys (with special characters) are left as literal dotted keys
  • Deep merge: When multiple dotted keys expand to the same path, their values are merged if both are objects
  • Conflict handling:
    • strict=true: Throws ex-info on conflicts (non-object collision)
    • strict=false: LWW (silent overwrite)

Parameters:

  • value: Decoded value to expand
  • strict: Whether to throw errors on conflicts
  • expand-paths: Whether to expand paths (:off or :safe)

Returns: Expanded value with dotted keys reconstructed as nested objects

Throws: ex-info if conflicts occur in strict mode

Expands dotted keys into nested objects in safe mode.

Recursively traverses a decoded TOON value and expands any keys
containing dots (`.`) into nested object structures, provided all segments
are valid identifiers.

Expansion rules:
- Keys containing dots are split into segments
- All segments must pass identifier validation
- Non-eligible keys (with special characters) are left as literal dotted keys
- Deep merge: When multiple dotted keys expand to the same path, their values are merged if both are objects
- Conflict handling:
  - strict=true: Throws ex-info on conflicts (non-object collision)
  - strict=false: LWW (silent overwrite)

Parameters:
  - value: Decoded value to expand
  - strict: Whether to throw errors on conflicts
  - expand-paths: Whether to expand paths (:off or :safe)

Returns:
  Expanded value with dotted keys reconstructed as nested objects

Throws:
  ex-info if conflicts occur in strict mode
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