harshvardhan.agr
harshvardhan.agr

Reputation: 175

Deserialize map of Int to Tuple using Jackson

I have a class that looks something like

case class A (id: Int, name: String, marks: Map[Int, List(Long, Long)])

I am using Jackson to serialize and store the objects in a database and read them back. However, when I deserialize it the Map is Map[String, List(Int, Int)].

I could get the keys deserialized correctly by using @JsonDeserialize(keyAs: classOf[Integer]) but I can't get the values to deserialize correctly.

Upvotes: 0

Views: 520

Answers (0)

Related Questions