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

为什么字典转模型时 传参数是 ObjectC 的 NSDictionary 类型 而不是 Swift 的 Collection 类型 #21

Closed
missyouguys opened this issue Oct 10, 2016 · 2 comments

Comments

@missyouguys
Copy link

missyouguys commented Oct 10, 2016

为什么 里面的实现 都是 用 的 Object-C 的 NSDictionary. NSArray 而不是 swift 的 Collection 呢
似乎也没有 Array -> Model

@xuyecan
Copy link
Contributor

xuyecan commented Oct 10, 2016

  1. 对于deserializeFrom()接口,目前确实只接受 string类型的json串 和 NSDictionary,后续会增加对 Swift的Dictionary<String, AnyObject>的支持。
  2. 如果是Model类里的属性类型,那 NSDictionary、NSArray、Dictionary<String, AnyObject>、Array 都是支持的呀。

@xuyecan xuyecan closed this as completed Oct 19, 2016
@xuyecan
Copy link
Contributor

xuyecan commented Oct 29, 2016

此外,Array -> Model,感觉没有这种场景吧,还是你说的是 Array -> Array呢?一个数组没办法映射到一个Model上的,因为Model对应的是KV结构的collection。

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

No branches or pull requests

2 participants