美文网首页
Json解析

Json解析

作者: b6e7b0be2603 | 来源:发表于2018-12-20 13:43 被阅读0次

    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];

        //设置解析器类型

        manager.responseSerializer = [[AFJSONResponseSerializer alloc]init];

        NSURL *url = [NSURL URLWithString:TEST_URL];

        NSURLRequest *request = [[NSURLRequest alloc]initWithURL:url];

        NSURLSessionDataTask *task = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {

            self->_dic = responseObject;

            [self->_tbv reloadData];

        }];

        [task resume];

    }

    相关文章

      网友评论

          本文标题:Json解析

          本文链接:https://www.haomeiwen.com/subject/wudykqtx.html