https://kotlinlang.org logo
d

Dan T

09/07/2022, 1:55 PM
Any suggestions or thoughts on how to support a config value with the signature
Map<String, Any>
? The error trying to use with the following sample values with a hocon source results in
Unable to locate a decoder for class kotlin.Any
Copy code
props {
  intVal = 1
  stringVal = "a"
}
I'm using it to populate a
java.util.Properties
object. I don't see a Decoder available out of the box, so before I explore a custom Decoder thought I'd check in case I'm missing something simple. Thanks!
s

sam

09/29/2022, 9:00 AM
I guess what you need is a decoder that just takes the value "as is" without actually decoding it (for the values).
25 Views