From 5a768fcda589fe93f04b9242a8f486bb536a1e59 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Tue, 3 May 2016 17:39:03 +0200 Subject: [PATCH] no message --- Pod/Classes/PNObject.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Pod/Classes/PNObject.m b/Pod/Classes/PNObject.m index 9fc1b29..00d7ddb 100644 --- a/Pod/Classes/PNObject.m +++ b/Pod/Classes/PNObject.m @@ -207,6 +207,10 @@ NSString * const PNObjectMappingSelector = @"selector"; NSString *mappedJSONKey; NSString *mappedJSONType; + if (self.JSON && [[self.JSON allKeys] count] == 0) { + self.JSON = [[NSMutableDictionary alloc] initWithDictionary:[self reverseMapping]]; + } + NSDictionary *properties = [PNObject propertiesForClass:self.class]; for (NSString* propertyName in self.JSONObjectMap) {