Your issue would seem to be that you haven't set the pathPattern
or keyPath
of any of the descriptors. This means that whenever RestKit tries to process any JSON it will try to process every single response descriptor as they all always match. So you'll get some good objects, and some empty objects (created but no data set).
You need to teach the response descriptors which data they are suitable for mapping.
If you have different URLs for each type of content:
##_URL_##/users.json
##_URL_##/categories.json
set the pathPattern
for each descriptor:
userResponse:
...ithMapping:userMapping
pathPattern:@"users.json"
keyPath:nil ...
If you have different sections of content in the JSON then you need to use the keyPath
.
Add as much information as you can to the pathPattern
and keyPath
to differentiate and allow RestKit to make sense of the data you expect to receive for each request you make.