In Scala 2.9 I would annotate a case class using the import scala.annotation.target.field
:
case class UserAuth(
@(JsonProperty@field)("email")
val email: String,
@(JsonProperty@field)("password")
val password: String
)
In 2.10 I go to compile a class, and I need to use import scala.annotation.meta.field
but suddenly it's throwing compiler errors like crazy. Is this the proper usage of the Scala case class annotation or can I revert back to simple @JsonProperty("email")
?
Looks like it was some sort of weird bug in the compiler, but I can confirm that the syntax @(JsonProperty@field)("email")
using import scala.annotation.meta.field
does work.
Looks like classes weren't loading properly and a simple sbt clean
fixed the issue. Will file a bug if the problem persists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With