These are chat archives for hseeberger/akka-http-json

7th
Aug 2016
Srepfler Srdan
@schrepfler
Aug 07 2016 19:50
hi

I get a failure to compile

case class Payslip(
                      id: String,
                      selections: Map[String, PayslipSelection]
                    )

  case class PayslipSelection(
                               payNumber: Integer
                             )

throwing an compile error where it should be used via implicit

Error:(70, 18) could not find implicit value for parameter um: akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller[Server. Payslip]
        entity(as[Payslip]) { payslip =>
Error:(70, 18) not enough arguments for method as: (implicit um: akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller[Server.Pay])akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller[Server.Payslip].
Unspecified value parameter um.
        entity(as[Payslip]) { payslip =>

without the selections: Map[String, PayslipSelection] it compiles nicely
using circe 0.4.1 and akka-http-circe 1.8.0

but also tried 0.5.0-M2 and result is the same
Map[String,SomeCaseClass] is something which should work under circe generic derivation I think, can this be something specifically with akka-http-json (circe)?