score:1

Accepted answer

you will need a json parser and a glue code between the json parser and akka http called unmarshaller.

akka http includes unmarshallers for spray-json library. you can find more unmarshallers in hseeberger/akka-http-json library.

if you choose to use spray-json a pseudo code for that would be

case class myjson(v1: string, v2: int)

object jsonprotocol extends defaultjsonprotocol {
  implicit val myformat = jsonformat2(myjson)
}

val resp: future[myjson] = unmarshal(response).to[myjson]

Related Query

More Query from same tag