相关疑难解决方法(0)

AFNetworking 2.0 - 可变json

我的代码目前看起来像这样

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];
Run Code Online (Sandbox Code Playgroud)

但是当尝试编辑接收到的对象中的字典时,我收到有关使用属于可变字典而不是字典的方法的错误.如何使AFNetworking使用嵌套的可变对象?

json objective-c ios afnetworking afnetworking-2

4
推荐指数
1
解决办法
1388
查看次数

标签 统计

afnetworking ×1

afnetworking-2 ×1

ios ×1

json ×1

objective-c ×1