Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. NSMutableArray * objDateTimeValues = [[NSMutableArray alloc] initWithObjects:theDate, theTime, nil];
  2.  
  3. NSDictionary * dictObjDateTime = [NSDictionary dictionaryWithObjects:objDateTimeValues forKeys:objDateTime];
  4.  
  5. NSString * dateAndTime = [NSString stringWithFormat:@"%@, %@", [dictObjDateTime objectForKey:@"date"], [dictObjDateTime objectForKey:@"time"]];
  6.  
  7.  
  8. // Step 1.2 => Create a dictionary for the other values
  9. NSMutableArray * objJsonConfRecv = [[NSMutableArray alloc] initWithObjects:@"datetime", @"a", @"b", @"c", @"d", nil];
  10.  
  11. NSMutableArray * objJsonConfRecvValues = [[NSMutableArray alloc] initWithObjects:dateAndTime, test1, test2, test3, test4, nil];
  12.  
  13. NSDictionary * dictObjJsonConfRecv = [NSDictionary dictionaryWithObjects:objJsonConfRecvValues forKeys:objJsonConfRecv];
  14.  
  15.  
  16. if ([NSJSONSerialization isValidJSONObject:dictObjJsonConfRecv])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement