diff --git a/Realm+JSON/RLMObject+JSON.m b/Realm+JSON/RLMObject+JSON.m index 806d812..75f8796 100644 --- a/Realm+JSON/RLMObject+JSON.m +++ b/Realm+JSON/RLMObject+JSON.m @@ -195,6 +195,16 @@ + (id)mc_createObjectFromJSONDictionary:(NSDictionary *)dictionary { if ([objectKeyPath isEqualToString:@"self"]) { return value; } + + if ([value isEqual:[NSNull null]]) { + if ([propertyClass isSubclassOfClass:[NSObject class]]) { + if ([NSString class] == propertyClass || [NSDate class] == propertyClass) { + continue; + } + } else { + continue; + } + } NSArray *keyPathComponents = [objectKeyPath componentsSeparatedByString:@"."]; id currentDictionary = result;