RestKit对于目录型的对象如何映射?

xiaocao000 发布于 2013/12/25 14:15
阅读 113
收藏 0

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;

加载中
0
xiaocao000
xiaocao000
属性同样映射为类本身
返回顶部
顶部