简体   繁体   中英

restkit JSON ios - putObject - send type info

im using restkit on ios, and trying to use the putObject method im 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM