0
的我用于返回我使用“MapPoints”(从DB)的阵列下面更改语法
extension Sequence where Iterator.Element == MapPoints {
func makeJSON() -> JSON {
return .array(self.map { $0.makeJSON() })
}
func makeResponse(request: Request) throws -> Response {
return try makeJSON().makeResponse()
}
}
现在这给出了一个错误“实例构件‘数组’不能在类型‘JSON’用“
有谁能告诉我应该怎么做?