Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion RMMapper/RMMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ +(id)populateObject:(id)obj fromDictionary:(NSDictionary *)dict {
// Else, set value for key
else {
// If the value is basic type and is not array, parse it directly to obj
// http://stackoverflow.com/questions/3663266/kvc-string-conversion-not-working-for-bool-value
if (![value isKindOfClass:[NSArray class]]) {
[obj setValue:value forKey:property];
@try{ [obj setValue:value forKey:property];
}@catch(NSException * e){ // catch the exception if the value is a boolean
if ([e.name isEqualToString:NSInvalidArgumentException])
[obj setValue:@([value intValue]) forKey:property];
}
}

// If property is NSArray or NSMutableArray, and if user provides
Expand Down