taquitos / JLObjectMapping

Simple JSON to object and object to JSON mapping inspired by Jackson JSON Processor for Java.
MIT License
5 stars 3 forks source link

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

Open taquitos opened 10 years ago

taquitos commented 10 years ago

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;

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.