JSON handling in akka-http.
- Marshalling
- Unmarshalling
- JSON Support (
SprayJsonSupport
by default) - Marshalling & Unmarshalling (in routing DSL)
Custom JSON (un)marshaller for akka-http by using 3rd party libraries. The community seems to be very active.
circe's decode[A]
produces Either[Error, A]
but akka-http requires Future[A]
. _.fold(Future.failed, Future.successful)
can be a solution to convert from Either[Throwable, A]
to Future[A]
.
- [Akka-HTTP]spray-jsonの使い方とAkka-HTTP
- Akka-HTTPを型で縛る (Bind Akka-HTTP by types)
- Akka HTTPでJacksonを使ってJSON変換をする