-
-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Description
Hello!
I'm getting a missing keys exception when key is a option generic field. Example:
case class Person(id: Int, name: String = "test") derives ReadWriter
case class Person2(id: Int, name: Option[String] = None) derives ReadWriter
case class ApiResult[T](data: Option[T] = None, @key("total_count") totalCount: Int) derives ReadWriter
println(read[Person]("{\"id\":1}")) // OK
println(read[Person2]("{\"id\":1}")) // OK
println(read[ApiResult[Person]]("{\"total_count\": 10}")) // Fail
Is there a way to get around this?
Metadata
Metadata
Assignees
Labels
No labels