• Statically allocate NSDateFormatters, since they are expensive to create and are likely to be reused with some frequency. Instantiate them lazily however.
• Check whether the destination property is primitive or NSNumber-derived, and attempt to parse JSON string values into NSNumbers if so.
• Also, pass property_attributes_t by reference instead of copying it.
• A trio of useful macros to help handling the reflection mappings and transforms.
- OSRKeyPath is inspired by EXTKeyPathCoding (from libextobjc), however it does away with the leading '@' to avoid hidden calls to +[NSString stringWithUTF8String:], simplifies it to always take (instance, key.path) arguments, and expands it to take a (class) type instead of an existing instance, making it usable in class methods without clunky workarounds.

Here's an example:

+ (NSDictionary *)reflectionMapping
{
	return @{
		@"id"		: KeyPath(TUser*, Id),
		@"photos"	: OSRTransform(KeyPath(TUser*, pictures)),
		@"wharves"	: OSRAdapt(KeyPath(TUser*, whatever), TWhateverClass)
	};
}

- (void)reflectionTranformsValue:(id)value forKey:(NSString *)propertyName
{
	if ([propertyName isEqual:KeyPath(self, pictures)]) {
		self.pictures = [TPicture objectsFromDicts:value];
	}
}