FasterXML / FasterXML/jackson-module-scala
Parameterized type violated when deserializing an Option
- Dominant language
- Scala
- Stars
- 506
- Forks
- 138
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 48
Description
I can deserialize just about anything into an `Option`:
``` scala
case class Foo(integer: Option[Int])
object OptionFail {
val mapper = new ObjectMapper() with ScalaObjectMapper
mapper.registerModule(DefaultScalaModule)
def main(args: Array[String]) {
val json = """{"integer" : "a cat"}"""
println(mapper.readValue[Foo](json))
// prints: Foo(Some(a cat))
}
}
```
Using:
```
libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-databind" % "2.7.3",
"com.fasterxml.jackson.module" % "jackson-module-scala_2.11" % "2.7.2"
)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.