I have a JSON object like so:
{
"name": "Brendan",
"images": ["some.url.to.image1",
"some.url.to.image2",
"some.url.to.image3"]
}
My class is as follows:
@interface MyModel : MTLModel <MTLJSONSerializing>
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSArray *images;
@end
@implementation MYModel
+ (NSDictionary*)JSONKeyPathsByPropertyKey {
return @{
@"name" : @"name",
@"images" : @"images"
};
}
@end
I can verify that MYModel object has name
properly set, but images
is set to null
. How can I populate an array of strings with Mantle?