Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是Github上的Argo新手(因为不能在 Swift 中使用 JSonModel)。创建新模型时出现错误,但不知道如何修复。有关详细信息,请参阅图片。
我确定您已经解决了,但是也许这可以帮助其他人阅读该问题:
在第一个参数上,函数应该是 map (<^>) not apply (<*>)
static func decode(j: JSON) -> Decoded<CountryState> { return curry(CountryState.init) <^> j <| "id" <*> j <| "name" <*> j <| "abbrev" }