Open MeGaPk opened 8 years ago
Hi, unfortunately the library doesn't map dictionaries automatically. However you could write a transformer.
Basically this code intercepts mapping for that key, and calls the block, so you have the opportunity to provide a value to be mapped to the property, and in this case you want to map the exact value without any change, so you simply return currentNode.
[mappingProvider mapFromDictionaryKey:@"data" toPropertyKey:@"data" forClass:[TFResponse class] withTransformer:^id(id currentNode, id parentNode) {
return currentNode;
}];
Will add this as an enhancement, thanks
@aryaxt Thanks :) Wait realization :+1:
Hello! Maybe its bug, i wanna report it.
So, we have Class:
And DICT:
After use code:
We have result:
For fix that, i use:
But maybe it is a bug, and so I decided to report it.
Wait answer. Best regards, Ivan.