MJ解析

作者: 你又脸红了i | 来源:发表于2019-01-20 09:35 被阅读0次
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
        [manager GET:@"http://v.juhe.cn/toutiao/index?key=67968aeebf1f4e3b6170f7217b6f3cdb" parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
            
            
    
            //
        self.dataSource = [Model mj_objectArrayWithKeyValuesArray:responseObject[@"result"][@"data"]];
    //
            
    // ================  字典包数组==============
     
    //                 [mjmodel mj_setupObjectClassInArray:^NSDictionary *{
    //                     return   @"类的数组属性":[字典对应的model class ];
    //                 }];
     
            
            
            [self.tbv reloadData];
            
            
           // NSLog(@"JSON: %@", responseObject);
        } failure:^(NSURLSessionTask *operation, NSError *error) {
            //NSLog(@"Error: %@", error);
        }];```

    相关文章

      网友评论

          本文标题:MJ解析

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