Note that there are some explanatory texts on larger screens.

plurals
  1. POno returns in NSJSONSerialization
    primarykey
    data
    text
    <p>Could you please forgive me for eventual mistakes i can make asking this question me it's my first one here.</p> <p>After reading several topics on this website, <a href="https://stackoverflow.com/questions/12255290/using-nsjsonserialization-to-parse-json">like this one</a> first i'll try to use the describe methods but it still doesn't work @ all :-(</p> <p>My .json file looks like this </p> <pre><code>{ "speakers" : [ { "name":"Value", "picture": "URL VALUE", "business":"VALUE", "desc":"VALUE", "twitter": "URL VALUE" } { ... } ] } </code></pre> <p>So this is my reasoning :</p> <p>I firstly have a <strong>dictionary</strong> which contains <em>speaker</em> attribute <br/> This one contains an <strong>array</strong>, field by some <strong>dictionnaries</strong> within <em>"name", "business"</em>,... attr.<br/><br/> So, this is my obj-C code :</p> <pre class="lang-objc prettyprint-override"><code>NSString *URLStr = @"URLofMyJsonFile"; NSURLRequest *JSONRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithString:URLStr ]]]; NSData *JSONData = [NSURLConnection sendSynchronousRequest:JSONRequest returningResponse:nil error:nil]; NSError *parsingError = nil; NSDictionary *speakerDictionnary = [NSJSONSerialization JSONObjectWithData:JSONData options:0 error:&amp;parsingError]; NSArray *speakersArray = [speakerDictionnary objectForKey:@"news"]; for (NSDictionary *oneSpeaker in speakersArray) { NSLog(@"The speakers's name is %@", [oneSpeaker objectForKey:@"name"]); NSLog(@"The speakers's business is %@", [oneSpeaker objectForKey:@"business"]); NSLog(@"The speakers's desc is %@", [oneSpeaker objectForKey:@"desc"]); } </code></pre> <p>EDIT : I remplace the right URL of my Script with Dummy</p>
    singulars
    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