开发者

restkit JSON ios - putObject - send type info

开发者 https://www.devze.com 2023-02-18 21:10 出处:网络
i m using restkit on ios, and trying to use the putObject method i m able to use it and send data with this format:

i m using restkit on ios, and trying to use the putObject method i m able to use it and send data with this format:

{"name":"Wet shirt night at Marquee","id":1,"idIcon":1,"note":78,"description":"connard","url":0}

however my web service is expecting something like: {"event":{{"name":"Wet shirt night at Marquee","id":1,"idIcon":1,"note":78,"description":"connard","url":0}}

see the difference, the type name "event" at the beginning

do you guys have any idea how to set up restkit to send the 开发者_运维技巧object type name with the object data?

Thx!


solution:

RKObjectMappable.m

RKObjectMappableGetPropertiesByElement

return a dictionary with object: your mapped dictionary key: your type name

0

精彩评论

暂无评论...
验证码 换一张
取 消