Reputation: 312
I want to map the following parameter and POST this request body to the server.
RKObjectMapping * mapping = [RKObjectMapping mappingForClass:[MessagingRequestModel class]];
[mapping addAttributeMappingsFromDictionary:@{
@"sessionId": @"sessionId",
@"dateFrom": @"dateFrom",
@"dateTo": @"dateTo",
@"MessageVO.seqId": @"seqId"
}];
The server expecting me to have keypath like MessageVO.seqId
but Restkit had serializing my keyPath to something like MessageVO[seqId]
, which server can't recognise this keypath.
I have tried something like manager.requestSerializationMIMEType=RKMIMETypeJSON;
but server do not recongnise JSON type as POST body.
How can I prevent keyPath .seqId
being converted to [seqId]
in RestKit RKObjectMapping?
Upvotes: 1
Views: 41