#import "JSONModel.h"
1 @protocol test2Model<NSObject> 2 @end 3 4 5 @interface test2Model : JSONModel 6 @property (nonatomic,strong)NSString<Optional> * qwrqwr; 7 @property (nonatomic,strong)NSString<Optional> * name; 8 @property (nonatomic,strong)NSString<Optional> * price; 9 @end 10 11 @interface test1Model : JSONModel 12 @property (nonatomic,strong)NSString<Optional> * order_id; 13 @property (nonatomic,strong)NSString<Optional> * total_price; 14 @property (nonatomic,strong)NSArray<test2Model,Optional> * product; 15 @end
#import "test1Model.h"
1 @implementation test2Model 2 3 +(JSONKeyMapper *)keyMapper{ 4 return [[JSONKeyMapper alloc] initWithDictionary:@{@"id":@"qwrqwr"}]; 5 } 6 @end 7 8 9 @implementation test1Model 10 11 @end