I need send to my request server an array in parameters, but this can't be contained between "".
I need send to my server the key users with the array [2, 5, 6] value like this:
"users" : [2, 5, 6]
I'm trying do this but I only can get the array in format ( 2, 5, 6) or like this:
"[2, 5, 6]"
This code only get the array with "":
NSMutableArray *array= [NSMutableArray arrayWithObjects:@"1", @"2",@"3",@"4", nil];
NSData *jsond = [NSJSONSerialization dataWithJSONObject: array options:NSJSONWritingPrettyPrinted error:NULL];
NSString *json = [[NSString alloc] initWithData:jsond encoding:NSUTF8StringEncoding];
How can I send my array in parameters in the correct format without ""?