0

我是Github上的Argo新手(因为不能在 Swift 中使用 JSonModel)。创建新模型时出现错误,但不知道如何修复。有关详细信息,请参阅图片。

在此处输入图像描述

4

1 回答 1

1

我确定您已经解决了,但是也许这可以帮助其他人阅读该问题:

在第一个参数上,函数应该是 map (<^>) not apply (<*>)

static func decode(j: JSON) -> Decoded<CountryState> {
        return curry(CountryState.init)
            <^> j <| "id"
            <*> j <| "name"
            <*> j <| "abbrev"
}
于 2016-02-25T11:29:50.043 回答