You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have now searched quite a long time but did not find a solution to the following problem:
I would like to map with RestKit my JSON response.
In general this is working but, if I have a multidimensional array with custom Objects the mapping does not work.
this is my JSON structure (this can not be changed):
For some reason, I have a second JSON call which is working absolutely fine.
Here is the one that works, only difference is that this second call does not contain custom objects just NSInteger...
// this works perfectly fine!!! The consumption is parsed correctly
@implementation ObjectConsumption
- (RKObjectMapping *) getFieldMappings
{
RKObjectMapping *venueMapping = [RKObjectMapping mappingForClass:[ObjectConsumption class]];
[venueMapping addAttributeMappingsFromDictionary:@{@"unit" : @"unit", @"xLabels" : @"xLabels", @"dataSets" : @"dataSets", @"values" : @"values"}];
return venueMapping;
}
@end
I have now searched quite a long time but did not find a solution to the following problem:
I would like to map with RestKit my JSON response.
In general this is working but, if I have a multidimensional array with custom Objects the mapping does not work.
this is my JSON structure (this can not be changed):
My mapping looks like this:
This is my Object Class
For some reason, I have a second JSON call which is working absolutely fine.
Here is the one that works, only difference is that this second call does not contain custom objects just NSInteger...
and here is the JSON for the consumption:
The text was updated successfully, but these errors were encountered: