You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@interface User : NSObject
@property (nonatomic) int user_id;
@property (nonatomic) NSString* registration;
@end
The dictionary is:
{
registration = "my test registration";
"user_id" = 10;
}
However OCMapper mapped user_id to userid(without underscore), I guess this is not supposed to be, you may want to map userid to _userid but forgetting the case when we have underscore at the middle.
Ok, I see the code in
@implementation ObjectInstanceProvider
// Support underscore case (EX: map first_name to firstName)
caseInsensitivePropertyName = [caseInsensitivePropertyName stringByReplacingOccurrencesOfString:@"_" withString:@""];
I just saw that automatic underscore mapping from the latest changelog, but what if we want to keep the same name as in he dictionary?
The text was updated successfully, but these errors were encountered:
as a workaround, I just removed that line of code,
but it would be better if it can allow user to choose wither default same name mapping or differen name mapping.
That was really annoying, spent two hours debugging it to discover that the component remove the underscores in the var names.
As I want to use the Pod, can that replace be optional instead of compulsory?
Hello,
I just found a problem of property name mapping when we have underscore at the middle of the property.
This is linked to
#46
My Model is:
The dictionary is:
However OCMapper mapped user_id to userid(without underscore), I guess this is not supposed to be, you may want to map userid to _userid but forgetting the case when we have underscore at the middle.
Ok, I see the code in
I just saw that automatic underscore mapping from the latest changelog, but what if we want to keep the same name as in he dictionary?
The text was updated successfully, but these errors were encountered: