no message

This commit is contained in:
giuseppenuc committed 2016-04-18 12:27:24 +02:00
1 parent 2e2ed83e95
commit 79b96fc967
2 files changed
+18 -8

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "PNObject" s.name = "PNObject"
s.version = "0.6.0" s.version = "0.6.1"
s.summary = "PNObject is a simple replica of the more complex ParseObject" s.summary = "PNObject is a simple replica of the more complex ParseObject"
# This description is used to generate tags and improve search results. # This description is used to generate tags and improve search results.
+17 -7
View File
@@ -52,8 +52,8 @@
} }
/*if (fromLocal) { /*if (fromLocal) {
propertyName = mappedJSONKey; propertyName = mappedJSONKey;
}*/ }*/
if ([[PNObject protectedProperties] containsObject:propertyName] || [self isObjNull:mappedJSONKey]) { if ([[PNObject protectedProperties] containsObject:propertyName] || [self isObjNull:mappedJSONKey]) {
continue; continue;
@@ -128,8 +128,13 @@
@"NSArray" : ^{ @"NSArray" : ^{
NSMutableArray *arr = [NSMutableArray array]; NSMutableArray *arr = [NSMutableArray array];
for(id JSONObject in value) { for(id JSONObject in value) {
PNObject *val = [[NSClassFromString(mappedJSONType) alloc] initWithJSON:JSONObject fromLocal:fromLocal]; if([[JSONObject class] isSubclassOfClass:[PNObject class]]) {
[arr addObject:val]; PNObject *val = [[NSClassFromString(mappedJSONType) alloc] initWithJSON:JSONObject fromLocal:fromLocal];
[arr addObject:val];
}
else {
[arr addObject:JSONObject];
}
} }
[self setValue:arr forKey:propertyName]; [self setValue:arr forKey:propertyName];
@@ -137,8 +142,13 @@
@"NSMutableArray" : ^{ @"NSMutableArray" : ^{
NSMutableArray *arr = [NSMutableArray array]; NSMutableArray *arr = [NSMutableArray array];
for(id JSONObject in value) { for(id JSONObject in value) {
PNObject *val = [[NSClassFromString(mappedJSONType) alloc] initWithJSON:JSONObject fromLocal:fromLocal]; if([[JSONObject class] isSubclassOfClass:[PNObject class]]) {
[arr addObject:val]; PNObject *val = [[NSClassFromString(mappedJSONType) alloc] initWithJSON:JSONObject fromLocal:fromLocal];
[arr addObject:val];
}
else {
[arr addObject:JSONObject];
}
} }
[self setValue:arr forKey:propertyName]; [self setValue:arr forKey:propertyName];
@@ -276,7 +286,7 @@
mappedValues = [formMappingValue valueForKey:@"values"]; mappedValues = [formMappingValue valueForKey:@"values"];
} }
else { else {
mappedKey = formMappingKey; mappedKey = formMappingKey;
} }
((void (^)())@{ ((void (^)())@{