In this link, the documentation uses instanceOf to marshal a object into JSON, as shown below:
val route = get {
completeWith(instanceOf[Person]) { completionFunction => findPerson(completionFunction) }
}
However, when I try to use the same I get the error "unable to resolve symbol instanceOf
". How can I fix this?
import akka.http.scaladsl.server.Directives._
– Stefano Bonetti