-
Notifications
You must be signed in to change notification settings - Fork 1k
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
generic array type #719
Comments
Yeah, I know it is totally inconvenient, because if you want ot map directly an array of mappable object - you have to use explicitly a different function. If u understand you correctly - you want to have a wrapper object for all of your responses. Where T is its generic value. If that is the case, you can do the following: |
Thanks @KoCMoHaBTa, that's correct. |
Hi I'm having the same problem now and the language I use is Swift 4 Is there a shorter way to do this without creating more boilerplate? |
I have same problem too. |
I want to write the follow code, the T is
Array<User>
, and User is a Mappable class. but the objectMapper can not do this for me. please give me a favorresponseModel = Mapper<ResponseModel<T>>().map(JSON: value as! [String: Any])
The text was updated successfully, but these errors were encountered: