I have a play controller REST end point that takes a json that I want to cast to the below case class in my Action.async
case class MyData(id:Name, role:String)
I did some reading at https://www.playframework.com/documentation/2.6.x/ScalaBodyParsers
I am still unclear how to use the syntax to cast the POST payload to my class.
I am trying along the following lines but it is not compiling
Action.async(??) {??
}