-
Notifications
You must be signed in to change notification settings - Fork 120
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
Still having an retrieving objects from a initialized nested arrays. #212
Comments
I will give it another look... |
On request here the workaround: You have to create a propertyConverter for that property. the decodeConverter will be called with an [[NSDictionary]]. In version 5.6.0 I added helper functions to convert it to [[YourObject]]. The code (from the unit tests) will look something like this:
|
Fyi, this fails for eg [[Double]], because Double doesn't get deserialized to an NSDictionary. Until something's fixed/changed, y'all, you can use some form of the following in the decodeConverter, taken from the definition nestedArrayMap:
|
I tried to reply to the old issue I had which had already been closed. I wish I hadnt been busy so I could have tested and replied to weather or not the issue had been fixed.
So, initializing a nested array has never really been initializing.
Specifically its when I try to access the data I get "fatal error: NSArray element failed to match the Swift Array Element type" on something like.
let dataModel = data[0][0][0]
Inspecting the data has on crash..the first nested array looks fine. Its the arrays inside that, that remain "_NSDictionaryM *".
In otherwords I see [0] = ([[App.MyDataModel])) -> [0] = ([App.MyDataModel]) -> [0] = (_NSDictionaryM *)
The text was updated successfully, but these errors were encountered: