konf
konf copied to clipboard
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Sample Properties file ``` prefix1.prefixA.name.keyA.key1 = value prefix1.prefixA.name.keyA.key2 = value prefix1.prefixA.name.keyB.key1 = value prefix1.prefixA.name.keyB.key2 = value prefix1.prefixB.name.keyA.key1 = value prefix1.prefixB.name.keyA.key2 = value prefix1.prefixB.name.keyB.key1 = value prefix1.prefixB.name.keyB.key2 = value ``` If...
```kt val handler = Account.maxRetry.onSet { value -> println("the maxRetry has changed to $value") } val handler2 = Account.maxRetry.beforeSet { config, value -> println("the maxRetry will change to $value") }...
It'd be great to allow something like this: ```kotlin object MyConfig : ConfigSpec() { val foo by required() } enum class MyEnum { FOO, BAR, } ``` ```yaml myConfig: FOO:...
I'm sorry for the multiple issues. I've just started integrating this into an app. This one would probably be trivial to implement in my app, but it might be nice...
I would really like to have real, concrete and working examples available. I have been trying to use this library for days now and I'm still not able to get...
Data classes with null property values are serialized with those values as a string literal with a value of "null" instead a null literal. Jackson then attempts to de-serialize the...
Hey there! Is there any way to follow to create a custom provider? Lets say creating a database provider for my use case. If there's is there any guide or...
Test case here: https://github.com/dtanner/konf-question/blob/get_at_question/src/test/kotlin/question/ConfigTest.kt#L32 I'd like to avoid using ConfigSpec classes, and instead use the `toValue()` function to instantiate configuration directly into target classes. For the case where I want...
Adds support that descriptions of `Item`s are added to saved configuration files. This is useful when auto-generating configuration files. Persisting custom comments between load and write isn't supported. - Is...
Currently, konf uses kotlin `1.4.32`. The latest kotlin version is `1.6.10`. Could this be updated for that? Some other libs may be also out of date, but I cannot check...