Delegated Properties

By far the simplest way to use config4k is via Kotlin Delegated Properties:

val config =
    ConfigFactory.parseString(
        """
|stringValue = hello
|booleanValue = true
|
        """.trimMargin(),
    )

val stringValue: String by config
println(stringValue) // hello

val nullableStringValue: String? by config
println(nullableStringValue) // null

val booleanValue: Boolean by config
println(booleanValue) // true