我怀疑我的回答描述符需要工作。我一直在审查RestKit Wiki上的ObjectMapping文档。我已经为myitem定义了类数组对象的详细信息,并为数组中的所有对象
Restkit成功发布但返回空数组作为mappingResult数组...如何获取返回的JSON数据?我从早期版本的Restkit中找到了一些代码,但它现在可能无法正常工作。我如何获得返回的JSON响应对象,以便我自己解析它?
RKResponseDescriptor *itemsDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:myItemsMapping method:RKRequestMethodAny pathPattern:nil keyPath:@"myItems" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
RKResponseDescriptor *itemDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:itemMapping method:RKRequestMethodAny pathPattern:@"/item" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
[[RKObjectManager sharedManager] addResponseDescriptor:itemsDescriptor];
[[RKObjectManager sharedManager] addResponseDescriptor:itemDescriptor];