Skip to content

Instantly share code, notes, and snippets.

@novakov-alexey-zz
Last active November 1, 2018 13:22
Show Gist options
  • Save novakov-alexey-zz/c4bc4f4f1d6046209d6b41f0cea53e7c to your computer and use it in GitHub Desktop.
Save novakov-alexey-zz/c4bc4f4f1d6046209d6b41f0cea53e7c to your computer and use it in GitHub Desktop.
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import spray.json.{DefaultJsonProtocol, DeserializationException, JsString, JsValue, JsonFormat, RootJsonFormat}
trait JsonCodes extends SprayJsonSupport with DefaultJsonProtocol {
implicit val trip: RootJsonFormat[Trip] = jsonFormat7(Trip)
implicit val trips: RootJsonFormat[Trips] = jsonFormat1(Trips)
implicit val commandResult: RootJsonFormat[CommandResult] = jsonFormat1(CommandResult)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment