Closed msalmaniftikhar closed 6 years ago
Resolved it using below code
struct DiaryDecodable: Diary {
typealias MeetingType = MeetingDecodable
var meetings: [MeetingType]? = nil
}
extension DiaryDecodable: Argo.Decodable {
static func decode(_ j: JSON) -> Decoded<DiaryDecodable> {
return curry(DiaryDecodable.init(meetings:))
<^> j <||? "resource"
}
}
we are updating our app from swift3 to swift4.
Error Messages
Decodable' is ambiguous for type lookup in this context. Cannot convert value of type '([DiaryDecodable.MeetingType]?) -> DiaryDecodable' (aka '(Optional<Array>) -> DiaryDecodable'
Sample JSON
Models
All models involved, including their
Decodable
implementations.Argo Version
Argo 4.1.2
Dependency Manager
Carthage