Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义属性映射时获取不到json字符串的值 #308

Open
fangzhenxing opened this issue Feb 18, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@fangzhenxing
Copy link

commented Feb 18, 2019

这个是我的属性 var paramValues = MoLastUpdateTime()

下面是我的自定义映射方法:

func mapping(mapper: HelpingMapper) {
        mapper <<<
            self.paramValues <-- TransformOf<MoLastUpdateTime, String>(fromJSON: { (string) -> MoLastUpdateTime? in
           // 我在这里获取到的string值为nil,请问是不是我哪里写错了?(补充:我的json数据里面是有这个字段的)
            }, toJSON: { (model) -> String? in
                
            })
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.