lucasmedeirosleite/EasyMapping — pull request #12 by chrisalbert (2013-05-24 17:02:13+00:00)
Title: Support Nested Serialization

I have a managed object mapping that maps attributes like this:
```
[mapping mapFieldsFromDictionary:@{
@"id":@"serverID",
@"info.title":@"title",
@"info.createDate":@"createDate",
}];
```

The corresponding Dictionary looks like this:
```
{
@"id":@"12345",
@"info":@{
@"title":@"title",
@"createDate":@"2013-05-23"
}
};
```

EKMapper executes just as expected and parses the nested dictionary correctly.
Serializing the resulting object with EKSerializer however ends up generating a Dictionary that looks like this:

```
{
@"id":@"12345",
@"info.title":@"title",
@"info.createDate":@"2013-05-23"
}
```

The value with ```[representation setObject:reverseValue forKey:fieldMapping.keyPath]``` path in ```setValueOnRepresentation:fromObject:withFieldMapping:```.

Better would be to split the keypath like ```NSArray *keyPathComponents = [keyPath componentsSeparatedByString:@"."];``` and enumerate over the components.