joshdholtz/jsonapi-ios — pull request #6 by brennanMKE (2014-07-11 02:58:17+00:00)
Title: Added developer assistant and made various enhancements

@joshdholz To make it easier to see which json keys were mapped to properties I added a developer assistant. I also added equality methods to the base `JSONResource` class which supports copying objects. I've updated the tests with the new functionality. I've also changed the syntax to use modern literal syntax.

Instead of...

````objective-c
[dict objectForKey:key]
````

It now simply uses...

````objective-c
dict[key]
````

I believe it is more readable and less typing. Eventually the Developer Assistant could do more than simply tracking which keys are mapped or not. It could actually log out code in Objective-C or Swift which can be copied in place for mappings for keys. That would speed up my work quite a bit.

A very nice to have feature would be to also track values to detect dates (NSDate), integers (NSInteger) and floats (CGFloat) and also recommend a formatter. This could be helped by looking at the type for the potentially mapped property. I've not done reflection with Objective-C, though I expect reading in JSON for a given resource class could be the start of a process to generate the mapping recommendations.