可以说我有一个
class FooCodecs[A : CodecJson] {
def ListCodec: CodecJson[List[A]] =
CodecJson.derived[IList](_.toList)(IList.fromList)
}
如何创建支持任意嵌套数量List
like的编解码器List[List[List[A]]
?
我尝试为 提供编解码器List[T[_] : CodecJson]
,但很明显它遗漏了一些对A
.
那么,如何让它递归呢?