Package kotlinx.serialization.hocon

HOCON serialization format implementation for converting Kotlin classes from and to Lightbend config.

Types

Link copied to clipboard
sealed class Hocon : SerialFormat

Allows deserialization of Config object from popular Lightbend/config library into Kotlin objects.

Link copied to clipboard
class HoconBuilder

Builder of the Hocon instance provided by Hocon factory function.

Functions

Link copied to clipboard
inline fun <T> Hocon.decodeFromConfig(config: Config): T

Decodes the given config into a value of type T using a deserializer retrieved from the reified type parameter.

Link copied to clipboard
inline fun <T> Hocon.encodeToConfig(value: T): Config

Encodes the given value of type T into a Config using a serializer retrieved from the reified type parameter.

Link copied to clipboard
fun Hocon(from: Hocon = Hocon, builderAction: HoconBuilder.() -> Unit): Hocon

Creates an instance of Hocon configured from the optionally given Hocon instance and adjusted with builderAction.