Skip to content

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

@taquitos

Description

@taquitos

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions