I have a NSURLConnection working that the return can be a dictionary or an array How to know what is the kind of response Dictionary or array, so I do the appropriate serialisation?
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSError* error;
NSDictionary* jsonDicto = [NSJSONSerialization
JSONObjectWithData:self.receivedData
options:kNilOptions
error:&error];
NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:self.receivedData
options:kNilOptions
error:&error];
}
Cheers .)