no message
This commit is contained in:
parent
5a768fcda5
commit
6134edbd12
@ -25,7 +25,7 @@
|
||||
@"street":@"street",
|
||||
@"number":@"number",
|
||||
@"zip":@"zip",
|
||||
@"location":@{@"key":@"location",@"type":@"PNLocation"},
|
||||
@"location":@{PNObjectMappingKey:@"location",PNObjectMappingType:@"PNLocation"},
|
||||
};
|
||||
return mapping;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ static bool isFirstAccess = YES;
|
||||
|
||||
+ (NSDictionary *)objcetMapping {
|
||||
|
||||
NSDictionary *mapping = @{@"user":@{@"key":@"user",@"type":[[[PNObjectConfig sharedInstance] userSubClass] PNObjClassName]},
|
||||
NSDictionary *mapping = @{@"user":@{PNObjectMappingKey:@"user",PNObjectMappingType:[[[PNObjectConfig sharedInstance] userSubClass] PNObjClassName]},
|
||||
@"deviceType":@"deviceType",
|
||||
@"deviceModel":@"deviceModel",
|
||||
@"deviceName":@"deviceName",
|
||||
|
||||
@ -409,7 +409,7 @@ static bool isFirstAccess = YES;
|
||||
@"sex":@"sex",
|
||||
@"birthDate":@"birthDate",
|
||||
@"phone":@"phone",
|
||||
@"password":@{@"key":@"password",@"type":[PNObjcPassword PNObjClassName]},
|
||||
@"password":@{PNObjectMappingKey:@"password",PNObjectMappingType:[PNObjcPassword PNObjClassName]},
|
||||
@"hasAcceptedPrivacy":@"hasAcceptedPrivacy",
|
||||
@"hasAcceptedNewsletter":@"hasAcceptedNewsletter",
|
||||
@"hasVerifiedEmail":@"hasVerifiedEmail",
|
||||
|
||||
@ -190,8 +190,8 @@
|
||||
id mappingValue = [self.JSONObjectMap valueForKey:propertyName];
|
||||
|
||||
if([mappingValue isKindOfClass:NSDictionary.class]) {
|
||||
mappedJSONKey = [mappingValue valueForKey:@"key"];
|
||||
mappedJSONType = [mappingValue valueForKey:@"type"];
|
||||
mappedJSONKey = [mappingValue valueForKey:PNObjectMappingKey];
|
||||
mappedJSONType = [mappingValue valueForKey:PNObjectMappingType];
|
||||
} else {
|
||||
mappedJSONKey = mappingValue;
|
||||
}
|
||||
|
||||
@ -206,6 +206,7 @@ NSString * const PNObjectMappingSelector = @"selector";
|
||||
|
||||
NSString *mappedJSONKey;
|
||||
NSString *mappedJSONType;
|
||||
NSString *type;
|
||||
|
||||
if (self.JSON && [[self.JSON allKeys] count] == 0) {
|
||||
self.JSON = [[NSMutableDictionary alloc] initWithDictionary:[self reverseMapping]];
|
||||
@ -217,14 +218,17 @@ NSString * const PNObjectMappingSelector = @"selector";
|
||||
id mappingValue = [self.JSONObjectMap objectForKey:propertyName];
|
||||
|
||||
if([mappingValue isKindOfClass:NSDictionary.class]) {
|
||||
mappedJSONKey = [mappingValue valueForKey:@"key"];
|
||||
mappedJSONType = [mappingValue valueForKey:@"type"];
|
||||
mappedJSONKey = [mappingValue valueForKey:PNObjectMappingKey];
|
||||
mappedJSONType = [mappingValue valueForKey:PNObjectMappingType];
|
||||
|
||||
} else {
|
||||
mappedJSONKey = mappingValue;
|
||||
mappedJSONType = [properties valueForKey:propertyName];
|
||||
}
|
||||
|
||||
NSLog(@"PropertyName PropertyType: %@ - %@",propertyName,mappedJSONType);
|
||||
type = [properties valueForKey:propertyName];
|
||||
|
||||
NSLog(@"PropertyName MappedJsonType PropertyType: %@ - %@ - %@",propertyName,mappedJSONType,type);
|
||||
|
||||
id value;
|
||||
|
||||
@ -321,7 +325,7 @@ NSString * const PNObjectMappingSelector = @"selector";
|
||||
|
||||
[JSON setValue:arr forKey:propertyName];
|
||||
}
|
||||
}[mappedJSONType] ?: ^{
|
||||
}[type] ?: ^{
|
||||
BOOL isPNObjectSubclass = [NSClassFromString(mappedJSONType) isSubclassOfClass:[PNObject class]];
|
||||
if(isPNObjectSubclass) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user