'pureconfig is not parsing boolean value Scala CovertFailure(WrongType(String, Set(Boolean)))
In my app.config file there is a property like:
enable-toggle-prop {
update-toggle-enabled=false
}
The file where I am parsing looks like this:
import pureconfig._
import pureconfig.generic.auto._
case class MyConfig(updateToggleEnabled: Boolean)
object MyConfig {
val config: MyConfig = {
val parseConfig = ConfigSource.default.at("enable-toggle-prop").load[MyConfig]
config match {
case Left(error) => //Throwing Illegal Argument exception
case Right(parsedConf) => parsedConf
}
}
When I am trying to deploy the app I am running into IllegalArgumentException saying "Configuration is Invalid: ConfigReaderFailure(CovertFailure(WrongType(String, Set(Boolean))))..." Why is it not able to convert Boolean? Is there anything I am missing here? TIA
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
