tristanhimmelman / AlamofireObjectMapper

An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
MIT License
2.66k stars 474 forks source link

getArrayResponse with nested arrays #216

Open dvkch opened 7 years ago

dvkch commented 7 years ago

Hi,

I am working with an API endpoint returning what could be described as [[Item]]. I am trying to use responseArray method on DataRequest, but it only works on arrays, not nested arrays.

I've only tried implementing a new responseArrays method, using a new ObjectMapperImmutableArraysSerializer serializer by replacting the content of ObjectMapperImmutableArraySerializer, but some methods have internal protection and I haven't been able to go further.

How would you approach this case?

Thanks for your answer and your time

yaroslavlvov commented 6 years ago

same issue objects with arrays of objects with nested arrays don't parse, always get empty arrays in response

tristanhimmelman commented 6 years ago

This project doesn't support that feature at this time. You would need to add new response functions to handle this case using the ObjectMapper mapArrayOfArrays function. If you have the time, feel free to submit a PR with this functionality

yinanwang1 commented 5 years ago

I have the some problem, when will fix this bug or completed this function?