After updating to spray 1.2 I got a problem regarding my JSON-Marshallers that worked perfectly with 1.1. Doing the following inside a HttpService
trait TestHttpService extends HttpService with SprayJsonSupport with DefaultJsonProtocol{ self : ActorLogging =>
case class Test(hallo: String, test: String)
implicit val storyJsonFormat = jsonFormat2(Test.apply)
def test(implicit m : Marshaller[Future[Test]]) = 17
def hallo = test
}
leads to the following error:
could not find implicit value for parameter marshaller:
spray.httpx.marshalling.Marshaller[scala.concurrent.Future[amanuensis.story.Story]]
When I just remove the future everything works well:
trait TestHttpService extends HttpService with SprayJsonSupport with DefaultJsonProtocol { self : ActorLogging =>
case class Test(hallo: String, test: String)
implicit val storyJsonFormat = jsonFormat2(Test.apply)
def test(implicit m : Marshaller[Test]) = 17
def hallo = test
}
So the Marshaller for Story itself seems to be in implicit-scope. I am confused now since I never had to do anything else to be able to marshal futures before.
I really would appreciate a hint, what I am doing wrong here...