1
回答
RestKit对于目录型的对象如何映射?
百度AI开发者大赛带你边学边开发,赢100万奖金,加群:418589053   

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
发帖于5年前 1回/112阅
顶部