Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

determine what should happen when multiple JSON properties map to the same objc property (many to one) #2

Open
taquitos opened this issue Feb 22, 2014 · 0 comments
Assignees

Comments

@taquitos
Copy link
Owner

This happens when you have an override in the propertyNameMap (to remap a JSON property name to an objc property name) and the JSON also includes the same name of the property:

{
"name":"josh",
"username":"turtles",
}

objc-
@Property username;

  • (NSDictionary *)propertyNameMap{
    return @{@"username" : @"name"}
    }

this shows that we should map JSON property "name" (josh) to the objc property "username". Since "username" (turtles) exists in the JSON as well, we can't guarantee which one will win out. We should probably spit out an error or something.

@taquitos taquitos self-assigned this Feb 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant