ConfigCodec

interface ConfigCodec<T : Any>

Encodes and decodes a typed configuration object.

Design note

The codec is separated from the store to avoid committing KTale to a specific format (YAML/TOML/JSON), while still enabling typed config objects.

Codecs can be replaced without changing plugin code that uses ConfigKey.

Functions

Link copied to clipboard
abstract fun decode(text: String): T

Parses text into a typed config object.

Link copied to clipboard
abstract fun encode(value: T): String

Serializes value into text suitable for storage.