Q:

iOS:OCMapper: Deserialize date from json

I have integrated OCMapper for converting json string to custom model object.I cannot able to deserialize date object. for example I have one json like 
NSString* sampleOutput=@"{\"UserType\":\"Admin\",\"testdate\":\"/Date(1438545600000+0400)/\"}";

NSData* sampleDate= [sampleOutput dataUsingEncoding:NSUTF8StringEncoding];

NSDictionary *loginDictionary = [NSJSONSerialization JSONObjectWithData:sampleDate options:NSJSONReadingAllowFragments error:&responseError];

MyModel* loginResponse= [[ObjectMapper sharedInstance] objectFromSource:loginDictionary toInstanceOfClass:[MyModel class]];

My Model class structure is 
`@interface MyModel : NSObject
@property(nonatomic,strong) NSString* userType;
@property(nonatomic,strong) NSDate* testdate;
@end`

But I got nil value for testdate object. Kindly provide me best way to do so.
If the json is 
 NSString* sampleOutput=@"{\"UserType\":\"Admin\",\"testdate\":\"2015-08-05\"}";

I can able to parse the date by InCodeMappingProvider
like 
InCodeMappingProvider *inCodeMappingProvider = [[InCodeMappingProvider alloc] init];
        NSDateFormatter *dateOfBirthFormatter = [[NSDateFormatter alloc] init];
        [dateOfBirthFormatter setDateFormat:@"yyyy-dd-MM"];
        [inCodeMappingProvider setDateFormatter:dateOfBirthFormatter forPropertyKey:@"testdate" andClass:[MyModel class]];
        [[ObjectMapper sharedInstance] setMappingProvider:inCodeMappingProvider];

But I need to convert the specific C# Date serialize format NSString* sampleOutput=@"{\"UserType\":\"Admin\",\"testdate\":\"/Date(1438545600000+0400)/

A:

Finally I found answer.
In ObjectMapper.m-> processDictionary: 
// Convert NSString to NSDate if needed
                    if ([propertyTypeString isEqualToString:@"NSDate"])
                    {
                        if ([value isKindOfClass:[NSDate class]])
                        {
                            nestedObject = value;
                        }
                        else if ([value hasPrefix:@"/Date("]){
                            nestedObject = [self myCustomDateConversion:value];
                        }
                        else if ([value isKindOfClass:[NSString class]])
                        {
                            nestedObject = [self dateFromString:value forProperty:propertyName andClass:class];
                        }
                    }

