Hocon

sealed class Hocon : SerialFormat

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

Config object represents "Human-Optimized Config Object Notation" — https://github.com/lightbend/config#using-hocon-the-json-superset.

Parameters

useConfigNamingConvention

switches naming resolution to config naming convention (hyphen separated).

serializersModule

A SerializersModule which should contain registered serializers for Contextual and Polymorphic serialization, if you have any.

Types

Link copied to clipboard
object Default : Hocon

The default instance of Hocon parser.

Functions

Link copied to clipboard
fun <T> decodeFromConfig(deserializer: DeserializationStrategy<T>, config: Config): T

Decodes the given config into a value of type T using the given serializer.

Link copied to clipboard
fun <T> encodeToConfig(serializer: SerializationStrategy<T>, value: T): Config

Encodes the given value into a Config using the given serializer.

Properties

Link copied to clipboard
open override val serializersModule: SerializersModule

Inheritors

Link copied to clipboard

Extensions

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.