I want to return list of json objects based on my case class objects. 

Following is my spray router, which returns list of 'Appointment' objects. 

```
trait GatewayService extends HttpService with SLF4JLogging {

  import com.sml.apigw.protocols.AppointmentProtocol._
  import spray.httpx.SprayJsonSupport._

  implicit def executionContext = actorRefFactory.dispatcher

  val router =
    pathPrefix("api" / "v1") {
      path("appointments") {
        get {
          complete {
            val a = new Appointment("1", "2")
            val l = List(a, a, a, a)
            l
          }
        }
      }
    }
  }
}

```

Following is the 'AppointmentProtocol' 

```
import spray.json.DefaultJsonProtocol

case class Appointment(id: String, patient: String)

object AppointmentProtocol extends DefaultJsonProtocol {
  implicit val appointmentFormat = jsonFormat2(Appointment.apply)
}

```

It gives the compilation error 'expression type of List[Appointment] doesn't confirms to expected type toResponseMarshallable'