Mapeo dinámico RestKit [cerrado]
Frecuentes
Visto 327 veces
0
I need to map this data into one Core Data object (EventList).
{
"eventList":[
{
"code":"hhel444440lhxxxxxn",
"name":"Test Event",
"id":"222495710159sdfdfd8000000",
"status":"Open",
"urls":[
{
"hostURL":"mything.association.somedomain.com",
"module":"association",
},
{
"hostURL":"mything.mobile.somedomain.com",
"module":"mobile",
}
]
}
]
}
====== I need it mapped to these attributes on my class ===========
@dynamic code;
@dynamic name;
@dynamic id;
@dynamic status;
@dynamic hostURL;
The hostURL should only be mapped if the value for module == mobile so in this case we don't want the url from the first of the urls where module == association. We need to skip the first one.
I am trying to use DynamicMapping, but when I try dynamic mapping I am getting:
valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "hostURL".'
1 Respuestas
0
Got it. I was cutting and pasting from other code I had written in missed changes.
contestado el 31 de mayo de 12 a las 21:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ios restkit or haz tu propia pregunta.
Can you please share your mapping code ? that could be helpfull ! - Vassily