如果我有这样的 JSON 数组,
{
"list": [
"javascript",
"stockFields",
"stockLists"
]
}
和两个模型,如:
@interface stockList : MTLModel <MTLJSONSerializing>
@property(nonatomic, copy, readonly) NSArray *stockListItems;
@end
@interface stockListItem : MTLModel
@property(nonatomic, copy, readonly) NSString *javascript;
@property(nonatomic, copy, readonly) NSString *stockFields;
@property(nonatomic, copy, readonly) NSString *stockLists;
@end
股票清单.m
+ (NSDictionary*)JSONKeyPathsByPropertyKey {
return @{
@"stockListItems":@"list",
};
}
+ (NSValueTransformer *)stockLstItemsJSONTransformer {
}
如何解析JSON列表数组属性存储stockListItem的属性?非常感谢!