import io.circe.generic.extras.{Configuration, ConfiguredJsonCodec}
@ConfiguredJsonCodec case class Foo(firstName: String)
object Foo {
implicit val snakeConfiguration=Configuration.default.withSnakeCaseMemberNames}
解析后
{"first_name":"Bob"}
我们得到
Foo("Bob")
如果我们向Foo添加其他空构造函数
@ConfiguredJsonCodec case class Foo(firstName: String) {
def this() = this("")
}
object Foo {implicit val
snakeConfiguration=Configuration.default.withSnakeCaseMemberNames}
我们会得到
could not find Lazy implicit value of type io.circe.generic.extras.decoding.ConfiguredDecoder[Foo]
请帮我解决该错误