0.9.0
Features
This version introduces support for non-nested one-mapping, that allows breaking a single JSON dictionary into graph of objects. For example:
{
"id":23,
"name": "Lucas",
"email": "[email protected]",
"gender" : "male",
"carId":3,
"carModel":"i30",
"carYear":"2013",
"phones": null
}
What we want from mapping this JSON to objects is a Person object, that contains Car object inside. And Car object should contain carId,carModel and carYear properties. This release adds a new method to do that:
[mapping hasOne:[Car class] forDictionaryFromKeyPaths:@[@"carId",@"carModel",@"carYear"]
forProperty:@"car" withObjectMapping:[Car objectMapping]];
This also works for serialization, object can be serialized into NSDictionary that we had earlier.