Let\'s say I have this example case class
case class Test(key1: Int, key2: String, key3: String)
And I have a map
myMap = M
This works well for me,if you use jackson for scala:
def from[T](map: Map[String, Any])(implicit m: Manifest[T]): T = { val mapper = new ObjectMapper() with ScalaObjectMapper mapper.convertValue(map) }
Reference from:Convert a Map to a POJO