is there an example of AFHTTPClient posting json with AFNetworking?
问题 Looking for an example of how to post json with AFHTTPClient . I see that there is a postPath method which takes an NSDictionary and the AFJSONEncode method returns an NSData . Is there an easy way to serialize an object to NSDictionary , or is there an easier way using jsonkit? I just need to post the object as json to a REST API. UPDATE: So I tried passing a dictionary over but it seems to break on serializing a nested array. For example, if I have an object: Post* p = [[Post alloc] init];