I have a pipeline:
import spray.httpx.unmarshalling._
import spray.client.pipelining._
import spray.json._
import MyJsonProtocol._ //which defines a formatter for MyCustomType
import spray.http._
import spray.httpx.SprayJsonSupport._
val pipeline = sendReceive ~> unmarshal[MyCustomType]
Compiler says that he can't find implicit value for parameter unmarshaller: spray.httpx.unmarshalling.FromResponseUnmarshaller[MyCustomType]
I've done it like in the sample in spray doc here. Why can not it resolve implicits?
EDIT
val pipeline = sendReceive ~> unmarshal[MyCustomType]
is used from method of anonymous class. I figured out that if I declare all my jsonFomats in that anonymous class(I mean stuff that resides in MyJsonProtocol
I replace to anonymous class) everything works fine.
So question is why this does not work with anonymous classes?