【问题标题】:restkit JSON ios - putObject - send type inforestkit JSON ios - putObject - 发送类型信息
【发布时间】:2011-03-19 02:30:10
【问题描述】:

我在 ios 上使用 restkit,并尝试使用 putObject 方法 我可以使用它并以这种格式发送数据:

{"name":"Marquee 湿衬衫之夜","id":1,"idIcon":1,"note":78,"description":"connard","url":0}

但是,我的网络服务期望如下: {"event":{{"name":"Marquee 的湿衬衫之夜","id":1,"idIcon":1,"note":78,"description":"connard","url":0 }}

看区别,类型名“event”开头

你们知道如何设置 restkit 来发送带有对象数据的对象类型名称吗?

谢谢!

【问题讨论】:

    标签: json ios rest types put


    【解决方案1】:

    解决方案:

    RKObjectMappable.m

    RKObjectMappableGetPropertiesByElement

    返回一个字典 对象:您的映射字典 key:你的类型名称

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-09
      • 1970-01-01
      • 2011-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-28
      • 1970-01-01
      相关资源
      最近更新 更多