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