A basic class for mapping JSON objects to their models. Also fully compliant w/ NSCoding
automatically. The only thing you need to do is subclass the model, declare your properties, and then override mapping using the following syntax:
- (NSMutableDictionary *)mapping {
NSMutableDictionary *mapping = [super mapping];
mapping[@"propertyName"] = @"associatedJSONKey";
}
If your property maps to another JSONMappableObject
, or an array of them, use the following syntax for your mapping key: