diff --git a/LYModelData/LYModel/NSObject+LYModel.m b/LYModelData/LYModel/NSObject+LYModel.m index 4d96441..59a38e7 100644 --- a/LYModelData/LYModel/NSObject+LYModel.m +++ b/LYModelData/LYModel/NSObject+LYModel.m @@ -40,17 +40,17 @@ -(BOOL)LYModelSelectProperties:(NSDictionary *)dictonary{ value = [dictonary objectForKey: key]; if (cls.propertyInfo[key]) { - [self LYModelSetPropertyWithModel:self value:value propertyInfo:cls.propertyInfo[key]]; + [self LYModelSetPropertyWithModel:value propertyInfo:cls.propertyInfo[key]]; } } return YES; } -(id)LYModelToJson{ - id jsonObject = [self LYModelToJsonObject:self]; + id jsonObject = [self LYModelToJsonObject]; return jsonObject; } --(id)LYModelToJsonObject:(NSObject *)model{ +-(id)LYModelToJsonObject{ Class cls = self.class; unsigned int countProperty = 0; @@ -60,23 +60,21 @@ -(id)LYModelToJsonObject:(NSObject *)model{ for (unsigned int i = 0; i