Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:20:40+00:00 2026-05-26T01:20:40+00:00

Hey every one i am programming an iphone app to get google search results

  • 0

Hey every one i am programming an iphone app to get google search results into my app ,,, i have used the JSON Class to get the result … when i parsed it in JSON Parser and store it in NSDictionary i got 3 keys :

  1. responseData
  2. responseDetails
  3. responseStatus

the important one is the first one responseData which is has the search results …

the problem that there is (i think) another key within responseData which is “results” which contains the urls and other stuffs which is the most important part for my app… how to access this one and put it into NSDictionary …..

this is the request :

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Paris%20Hilton

and to make things clear please consider to put that request into your browser and when you get the results copy it and put it in this website at the left side to see what the keys and other things:

http://json.parser.online.fr/

thnx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:20:41+00:00Added an answer on May 26, 2026 at 1:20 am

    You could use JSON parser – SB Json to convert json string into ObjectiveC objects. Note that there are a number of JSON parsers available in ObjectiveC but I chose SB Json for it’s ease of usage. But according to some benchmarks JSONKit is faster than SBJson.

    Once you have your json string use this like so –

    #import "JSON.h"
    
    // Create SBJSON object to parse JSON
    SBJSON *parser = [[SBJSON alloc] init];
    
    // parse the JSON string into an object - assuming json_string is a NSString of JSON data
    NSDictionary *object = [parser objectWithString:json_string error:nil];
    NSLog(@"JSON data: %@", object);
    

    Here’s what you would do if you needed to parse public timeline from Twitter as JSON.The same logic could be applied to your Google Search results. You need to carefully inspect your json structure that’s all…

    // 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"]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey everyone I am trying to get back into Spring programming on tomcat6. Can
Hey everyone, I'm basically new to programming. I've decided to try and get started
Hey everyone. I'm not big into UI programming so this may be an easy
Hey folks, every once in a while I have the need to automate data
hey every one I want to alert value of n from this string $('.orbit-bullets:has(
Hey everyone! I am new to blackberry programming although I do have some java
hey every one I newbie in php and i make simple upload page and
Hey, I want to process one attribute of every object inside one queryset, and
Hey there, everyone. A really random question, but I'm looking to get into some
Hey everyone, great community you got here. I'm an Electrical Engineer doing some programming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.