File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,15 +178,15 @@ Each post has an author and the conversion class (User) doesn't have a property
178178 {
179179 "title" : "Post 1 title",
180180 "datePosted : "04/15/2013",
181- "author " : {
181+ "from " : {
182182 "firstName" : "Chuck",
183183 "lastName" : "Norris"
184184 }
185185 },
186186 {
187187 "title" : "Post 2 title",
188188 "datePosted : "04/12/2013",
189- "author " : {
189+ "form " : {
190190 "firstName" : "Chuck",
191191 "lastName" : "Norris"
192192 }
@@ -197,8 +197,8 @@ Each post has an author and the conversion class (User) doesn't have a property
197197// Handle different key for dateOfBirth
198198[inCodeMappingProvider mapFromDictionaryKey: @"dob" toPropertyKey:@"dateOfBirth" forClass:[ User class]] ;
199199
200- // Handle conversion of "author " to a "User " object
201- // Mapping would NOT be required if both dictionary an drpopery were named 'user'
200+ // Handle mapping of "form " to "auther " object
201+ // Mapping would NOT be required if dictionary key and property were both named the same
202202[ inCodeMappingProvider mapFromDictionaryKey:@"author" toPropertyKey:@"author" withObjectType:[ User class] forClass:[ Comment class]] ;
203203
204204User * user = [ User objectFromDictionary: aDictionary ] ;
You can’t perform that action at this time.
0 commit comments