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数据字段对应的值是<null>,对应到ios的字典里面就是一个NSNull的实例,这里做了一个判断,如果… #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrzsun
Copy link

@mrzsun mrzsun commented May 15, 2016

实际开发中有可能后台返回的json数据字段对应的值是,对应到ios的字典里面就是一个NSNull的实例,这里做了一个判断,如果字典里的值是一个NSNull的实例,会转成一个nil值。不会在把这个null值赋值给模型的属性(如果赋值swift的基础类型会引起crash)。

@CharlinFeng
Copy link
Owner

好的。这个我处理一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants