Hello everyone,

what is required to get the following compile?

class TestUnmarshalling{

  sealed trait Xor[+A,+B]
  object Xor{
    def left[A,B](a:A):Xor[A,B] = Left(a)
    def right[A,B](b:B):Xor[A,B] = Right(b)
  }

  case class Left[A] (a:A)extends Xor[A,Nothing]
  case class Right[B](b:B) extends Xor[Nothing,B]

  implicit val actorSystem = ActorSystem()
  implicit val actorMaterializer = ActorMaterializer()

  implicit val xorMarshallers:ToResponseMarshaller[Xor[Throwable,String]] = 
???

  private val routes = path("pippo") {
    pathEnd {
      get {
        complete(Xor.left[Throwable, String](new 
NullPointerException("hello world")))
      } ~
        post {
          implicit val streamingSupport = EntityStreamingSupport.json()
          val s = Source.single(Xor.left[Throwable, String](new 
NullPointerException("hello world")))
          complete(s)
        }
    }
  }


}

The get part of the route compile, the post doesn't. It looks like the 
toResponseMarshaller isn't enough to get that source to marshal?

Thanks

Edmondo

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to