1

我正在尝试使用avro4s FieldMapper映射案例类的字段。

implicit val short: FieldMapper = {
  case "fieldName1" => "fieldName2"
}

但我收到以下错误:

Error:(20, 39) missing parameter type for expanded function
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type was: com.sksamuel.avro4s.FieldMapper
    implicit val short: FieldMapper = {

我发现与此错误相关的类似问题:

但是,我无法为我的特定问题找到解决方案。

任何帮助表示赞赏!

4

0 回答 0