【发布时间】:2018-08-30 11:50:01
【问题描述】:
这里是 JSON 文件
https://drive.google.com/file/d/1WOE6HEylc5FnAo9NekMdwPU3xEuGUgMg/view?usp=sharing
我正在获取此 JSON 数据,我正在尝试打印 JSON,但它没有打印完整的 JSON。
在 JSON 内部,有一个关键的“文件”,它包含 base64 编码的数据。它的价值非常大。
我正在尝试打印整个 JSON 或仅打印关键“文件”的值,但我得到的数据不完整。
我不知道,为什么我得到了一半的数据。
这是我写的代码,
NSMutableArray *mutableArray=[json copy];
NSDictionary *threadDict=[mutableArray objectAtIndex:indexPath.row];
NSLog(@"Ticket Thread Dict is : %@",threadDict);// It is not printing full json
NSMutableArray *attachmentArray=[[NSMutableArray alloc]init];
attachmentArray =[threadDict objectForKey:@"attach"];
NSDictionary *attachDictionary=[attachmentArray objectAtIndex:indexPath.row];
NSString *fileData = [NSString stringWithFormat:@"%@", [attachDictionary objectForKey:@"file"]];
NSLog(@"Fina Name is : %@",fileData); // this is not printing full data
【问题讨论】:
-
问问自己这两者中哪一个是受限的:
NSString或NSLog。如果第一个没问题,那么它可以使用多个日志打印... -
如何获取完整数据?有什么解决办法?
标签: ios objective-c json nsmutablearray