定義爲List [A]的JSON元素B,我無法將List[A]編組爲適當的Json(對象數組)。我使用的是AKKA-Http和Spray-Json。 我定義了兩個case類: final case class Item(id: String, pid: String, title: String)
final case class Items(items: List[Item])
而對通話G
我正在使用Akka HTTP(在Scala中)處理REST服務。我希望傳入一個http請求的參數被轉換爲ZonedDateTime類型。代碼工作正常,如果我嘗試使用String或Int但失敗與ZonedDateTime類型。該代碼看起來像這樣: parameters('testparam.as[ZonedDateTime])
這裏是我看到的錯誤: Error:(23, 35) type mis