我的代码目前是这样的
NSURL *URL = [NSURL URLWithString:URLForSend];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]
initWithRequest:request];
operation.responseSerializer = [AFJSONResponseSerializer serializer];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject)
{
NSLog(@"%@", responseObject);
[BoxJsonDataHelper gotNewJson:responseObject];
} failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Request Failure Because %@",[error userInfo]);
}];
[operation start];
但是,当尝试编辑接收到的对象中的字典时,会出现一个错误,提示使用属于可变字典而非普通字典的方法。如何让AFNetworking使用嵌套的可变对象呢?