-
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Description
def testJsonWithOption() {
val mapper = new ObjectMapper()
mapper.registerModule(new JacksonModule
with CaseClassModule
with EnumerationModule
with SeqModule
with IterableModule
with TupleModule
with MapModule
with OptionModule
)
val writer = new StringWriter()
mapper.writeValue(writer, Option(42))
println(writer.toString)
}
That throws an exception. It works fine if I remove the CaseClassModule from the mixin. Do you know how I can fix this? Deserialization works fine. I really want a nested Option in my case class.
In fact the CaseClassModule by itself does not work properly with Options.
Metadata
Metadata
Assignees
Labels
No labels