Added default mapping blocks
- Added
WANSCodingStore
to the main header - Added a way to register default mapping block for specific classes.
For example, you can now add a default mapping block to turnstrings
toNSDate
id(^toDateMappingBlock)(id ) = ^id(id value) {
if ([value isKindOfClass:[NSString class]]) {
return [defaultDateFormatter dateFromString:value];
}
return value;
};
[mapper addDefaultMappingBlock:toDateMappingBlock
forDestinationClass:[NSDate class]];