Fix keypath regression #265

wants to merge 2 commits into


None yet

2 participants


Accept NSArray as a valid JSON Object to fix the regression #257

/cc @robb

Mantle member

Thanks for looking into this

However, also allowing NSArray somewhat defeats the purpose of #230 which was to catch crashes when resolving invalid keypaths due to unexpected JSON responses.

Consider the MTLArrayTestModel in the spec:

@implementation MTLArrayTestModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
   return @{
       @"names": @""


If the server returned JSON like this

    "users": [

we'd still crash with an NSUnknownKeyException since NSString is not key value coding-compliant for the key name.

@robb robb referenced this pull request Mar 9, 2014

Keypath regression #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment