Friday, 15 March 2013

ios - Map top level array of strings with RestKit -


I find it difficult to deal with a webservice, which has no top-level array of paces and only the wires in the array If this happens, it will be easy to map:

I thought that if there is a zero keypath and the mapping value class: ["foo", "bar", "baz"]}

NSString class] may be a trick, but it seems Not done (I'm not sure that for NSString Note also makes sense, but thought it is a special case that restkit can handle).

You need to use a zero key path, but you are expected to use an object In String is a feature. Something like this: RKIntmapping * ObjectMapping = [RKIntmapping MappingForrentFormName: ...]; [Objectmapping adaprophy mapping: [RKAttitbet mapping attribute mapping from the palm: Nile tokypath: @ "name"]]; Objectmapping Identity fact = @ [@ "name"];

If you just want to map to an array of strings, then you do not need a recycle and you should just use AFJSONRequestOperation .

No comments:

Post a Comment