The following code
case class User(name: String, email: Option[String] = None)
val mapper = new ObjectMapper()
mapper.registerModule(DefaultScalaModule)
mapper.enableDefaultTyping()
mapper.writeValueAsString(User("John Smith", Some("j.smith@example.com")))
will lead to this exception:
com.fasterxml.jackson.databind.JsonMappingException: Type id handling not implemented for type scala.Some (through reference chain: User["email"])