Note that there are some explanatory texts on larger screens.

plurals
  1. POUse of undeclared identifier in json for iOS
    primarykey
    data
    text
    <p>I am getting a use of undeclared identifier error in my json but I am following the example from <a href="http://blog.zachwaugh.com/post/309924609/how-to-use-json-in-cocoaobjective-c" rel="nofollow">http://blog.zachwaugh.com/post/309924609/how-to-use-json-in-cocoaobjective-c</a></p> <p>how do I fix this? Yes I am very new to objective-c \ ios :) Thanks</p> <p>I am putting this code in my view based application in my viewcontroller.m file</p> <p>The issue is with "SBJSON *parser = [[SBJSON alloc] init];"</p> <pre><code> // Create new SBJSON parser object SBJSON *parser = [[SBJSON alloc] init]; // Prepare URL request to download statuses from Twitter NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.json"]]; // Perform request and get JSON back as a NSData object NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; // Get JSON as a NSString from NSData response NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding]; // parse the JSON response into an object // Here we're using NSArray since we're parsing an array of JSON status objects NSArray *statuses = [parser objectWithString:json_string error:nil]; // Each element in statuses is a single status // represented as a NSDictionary for (NSDictionary *status in statuses) { // You can retrieve individual values using objectForKey on the status NSDictionary // This will print the tweet and username to the console NSLog(@"%@ - %@", [status objectForKey:@"text"], [[status objectForKey:@"user"] objectForKey:@"screen_name"]); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload