MantleFramework/Mantle — pull request #266 by robb (2014-03-09 13:14:31+00:00)
Title: Keypath regression

This is an alternative approach to fixing the key path regression introduced in Mantle `1.4`.

The previous implementation introduced in #230 would assume that every element along the key path apart from the last one would be an instance of `NSDictionary`. However, the documentation did not explicitly require this and #257 and #259 show how users would rely on the old behavior when mapping over `NSArray`s in the JSON response.

Since there doesn't seem to be a good way of checking reliably if an object is Key-Value-Compliant for a given key, this effectively restores the pre-#230 behavior but wraps the call to `-valueForKeyPath:` in a try catch block, bubbling up the exception on the error parameter.

In `2.0`, we may want to consider requiring all objects along the JSON key path to be `NSDictionary` instances.

Closes #265
Fixes #257 #259