3
我有以下JSON结构:导线向上在JSON使用映射时RestKit 0.20
{
"category": "MyCategory"
"objects": [
{ "id": 1, "name": "A" },
{ "id": 2, "name": "B" },
{ "id": 3, "name": "C" }
]
}
我映射每个对象到一个单独的核心数据实体是这样的:
RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:@"Object" inManagedObjectStore:manager.managedObjectStore];
mapping.identificationAttributes = @[ @"id" ];
[mapping addAttributeMappingsFromDictionary:@{ @"name": @"name" }];
如何是否配置映射以在每个对象上存储共享类别?
我想的事情是要能够向上遍历的JSON这样的:
[mapping addAttributeMappingsFromDictionary:@{ @"name": @"name", @"PARENT.category": @"category" }];
http://en.wikipedia.org/wiki/Depth-first_search – 2013-05-26 21:10:47
我不明白的链接是如何有用吗? – thejaz