1
回答
RestKit对于目录型的对象如何映射?
【腾讯云】校园拼团福利,1核2G服务器10元/月!>>>   

json格式:

[{parentId: -1,subCategories:[{parentId: 1,subCategories:[],name:"水果",id:2},{parentId: -1,subCategories:[],name:"饮料",id:3}],name:"推荐",id:1},{parentId: -1,subCategories:[],name:"热门",id:4}]

Catelog类属性:

@property (retain, nonatomic) NSSring* id;

@property (retain, nonatomic) NSSring* name;

@property (retain, nonatomic) NSSring* parentId;

@property (retain, nonatomic) NSArray* subCategories;

举报
xiaocao000
发帖于4年前 1回/111阅
顶部