I am using Argo with Runes and Box framework , i have followed the Carthage way of adding frameworks. Here is my Model Class for Cities
import Argo
import Runes
struct Cities {
let cityName: String
let cityState: String
}
extension Cities: Decodable {
static func create(cityName: String)(cityState: String!) -> Cities {
return Cities(cityName: cityName, cityState: cityState)
}
static func decode(j: JSON) -> Decoded<Cities>
{
return Cities.create <*> j <| "cityName" <*> j <| "cityState"
}
}
I get the following error : Could not find an overload for '<*>' that accepts the supplied arguments at return Cities.create <*> j <| "cityName" <*> j <| "cityState"
How can i fix this issue?
sample json :
{"cityName":"Panaji","cityState":"Goa"}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire