次のjson応答をマップしようとして苦労しています:
{
"data":
{
"plans":
[
{
"planid":"10",
"plandescription":"foo",
"plantype":"2",
"planvalue":"30",
"status":"Active"
}
]
}
}
これは私がやろうとしていることです:
RKObjectMapping *planMapping = [RKObjectMapping mappingForClass:[Plans class]];
[planMapping addAttributeMappingsFromDictionary:@{
@"planid": @"planId",
@"plandescription": @"planDescription",
@"plantype": @"planType",
@"planvalue": @"planValue",
@"status" : @"status"
}];
RKResponseDescriptor *planResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:planMapping pathPattern:nil keyPath:@"data/plans" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
[objectManager addResponseDescriptor:planResponseDescriptor];
しかし、オブジェクトはマップされません:\何が問題なのですか?