iphone - RestKit 中的对象映射

标签 iphone objective-c ios restkit

我有一个这种格式的 JSON 响应

{"status":
{
"id":0,
"offerList":[{"offerId":38,"title":"TITLE OFFER 38","shortDescription":"OFFER PCT 38","orginalPrice":100,"image":"offer-38.jpg","description":"DESCRIPTION OFFER 38","shopId":4,"startDate":"5/29/2011 12:00:00 AM","endDate":"8/10/2011 12:00:00 AM","startTime":"16:30:00","endTime":"21:59:59","insertionDate":"7/5/2011 4:42:40 AM","categoryId":0,"subCategoryId":0,"published":1}

"shopList":[{"id":4,"name":"Store 1","street":"Street Store 1","postCode":"88214","city":"Barcelona","state":"","country":"Spain, Kingdom of","description":"Loc Description Store 1","url":"http://www.store-1.com","email":"store1@gmail.com","telephone":"Phone-number-store-1","published":1,"lastUpdated":"7/5/2011 4:42:40 AM","latitude":41.4398,"longitude":2.1601}]
}
}

我正在使用 restkit 进行对象映射。使用 RKManaged 对象映射此 JSON 的可能方法是什么。 有人可以帮忙吗?我被困了过去 3 天。 谢谢

最佳答案

Zach,你应该在 RestKit 上问这个问题邮件列表,并更具体地说明您想要实现的目标。

无论如何,RestKit 作者 Blake Watters 刚刚发布了一个 new document describing Object Mapping ,这应该可以回答您的所有问题。祝你好运!

关于iphone - RestKit 中的对象映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6576795/

相关文章:

iphone - 如何创建 openstreetmap 离线 ios map

iphone - 如何创建一个同步的NSURLConnection请求

ios - 将 float 分配到全局数组中

iphone - iOS5 上的 CCKeyDerivationPBKDF

iphone - iOS 应用内购买分步教程

iphone - Objective-C - 对 NSMutableStrings 使用 deleteCharactersInRange

ios - 执行选择器 :withObject:afterDelay not calling selector

ios - 动态设置 UICollectionView 的 ContentSize

ios - 如何在ios中等待http请求的响应

ios - React-Native 和 xcode 10 - 将 Base SDK 设置为 12.1 但编译为 11