dchohfi / KeyValueObjectMapping

Automatic KeyValue Object Mapping for Objective-C, parse JSON/plist/Dictionary automatically
http://dchohfi.com/
MIT License
600 stars 90 forks source link

don't parse property that doesn't exist in object. #12

Closed kostiakoval closed 11 years ago

kostiakoval commented 11 years ago

I had exception when tried to parse json with destination object that doesn't have some property. Parser should skip not existing properties.

Example - " { "id": "27924446", "name": "Diego Chohfi" } " @interface TestClass @property (nonatomic, strong) NSString *id; // I don't want to parse name

DCKeyValueObjectMapping parser = [DCKeyValueObjectMapping mapperForClass: [TestClass class] andConfiguration:nil]; TestClass test = [parser parseDictionary:jsData];

dchohfi commented 11 years ago

Hi @konstantinkoval thank you for your support :D

Your pull request does fix the bug?

kostiakoval commented 11 years ago

Hi @dchohfi, You are welcome :) Yes, it does.

dchohfi commented 11 years ago

Awesome! Thank you for the pull request and you've also added tests! It's awesome!