Skip to content

Instantly share code, notes, and snippets.

@wilsolutions
Created October 22, 2011 15:16
Show Gist options
  • Save wilsolutions/1306098 to your computer and use it in GitHub Desktop.
Save wilsolutions/1306098 to your computer and use it in GitHub Desktop.
warning: unused variable 'jsonFound1' [-Wunused-variable,12]
NSURL *apiURL = [NSURL URLWithString:@"http://api.stackoverflow.com/1.1/questions?tagged=objective-c&pagesize=30"];
NSError *error = nil;
// First option - failed
NSInputStream *inputStream = [NSInputStream inputStreamWithURL:apiURL]; // returning nil
id jsonFound1 = [NSJSONSerialization JSONObjectWithStream:inputStream options:NSJSONReadingMutableContainers error:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment