jerkson
jerkson copied to clipboard
Can't parse case class with type-alias field
import com.codahale.jerkson.Json
object A {
type Z = Int
case class Ok(x: Int)
case class Bad(x: Z)
def main(args: Array[String]) {
println(Json.parse[Ok]("""{"x":3}"""))
println(Json.parse[Bad]("""{"x":3}""")) // ERROR: java.lang.ClassNotFoundException: Z
}
}
Hi! It's a known issue, unfortunately. You have to deal with types by their own names.