You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final case class NestedLong(var id: Option[Long] = None)
final case class ParentWithNested(var nested: NestedLong)
When deserializing this, we obtain an Integer instead of a Long in the id field.
As stated in the FAQ, we used the following sentence to give the correct Option primitive type on deserialize : ScalaAnnotationIntrospectorModule.registerReferencedValueType(classOf[NestedLong], "id", classOf[Long])
However, it seems that it doesn't work when the option have an initialization value set to None.
The same model without initialization works :
final case class NestedLong(var id: Option[Long])
final case class ParentWithNested(var nested: NestedLong)
Yours faithfully,
LCDP
The text was updated successfully, but these errors were encountered:
With the following scala case classes :
When deserializing this, we obtain an
Integer
instead of aLong
in theid
field.As stated in the FAQ, we used the following sentence to give the correct Option primitive type on deserialize :
ScalaAnnotationIntrospectorModule.registerReferencedValueType(classOf[NestedLong], "id", classOf[Long])
However, it seems that it doesn't work when the option have an initialization value set to None.
The same model without initialization works :
Yours faithfully,
LCDP
The text was updated successfully, but these errors were encountered: