jackson-module-scala
jackson-module-scala copied to clipboard
Scalas Int type is not handled in the same way as java.lang.Integer
Please see http://stackoverflow.com/questions/19379967/strange-deserializing-problems-with-generic-types-using-scala-and-jackson-and-ja for details.
Shouldn't be the scala "primitive types" be auto converted from Strings?
As answered on StackOverflow, this is now explained in the FAQ. I'm leaving it open, however, as a placeholder for fixing the issue more permanently.
Another solution is having @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS) annotation to class data members. It adds metadata to the data member and jackson is able to parse correctly the type.