0

Here is JSON file

https://drive.google.com/file/d/1WOE6HEylc5FnAo9NekMdwPU3xEuGUgMg/view?usp=sharing

I am getting this JSON data, I am trying to print JSON but it is not printing full JSON.

Inside JSON, there is one key "file", it contains base64 encoded data. Its value is very large.

I am trying to print the whole JSON or only value for a key "file" but I am getting incomplete data.

I do not know, why I am getting half data.

Here is the code I wrote,

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
PPL
  • 6,357
  • 1
  • 11
  • 30

1 Answers1

1

Its nothing to do with the size of your Array/NSMutableArray. Earlier i have faced the same issue, NSLog is not able to log my base64 string completely so later i used

printf("base64 String %s", [jsonString UTF8String]);

Try to use the above code in place of NSLog. It will work and you can see your log.

Madhu
  • 439
  • 2
  • 14