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 8542973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:11:40+00:00 2026-06-11T12:11:40+00:00

Good day everyone! I would just want to ask what is wrong with what

  • 0

Good day everyone! I would just want to ask what is wrong with what I am doing. I am working with this for two days and yet I still can’t make it. It says “unrecognized selector sent to instance 0x748b800”.
What I am doing is parsing a json returned value. Below is the sample json returned value:

{
   "data": [
      {
         "name": "John Patola",
         "id": "123444432"
      },
      {
         "name": "Joshua Valdez",
         "id": "22234567778"
      }
]
}

I want to store them in an array called
NSArray *storage.
Below are my codes:

-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
[self.rData appendData:data];
}
-(void)connection: (NSURLConnection *)connection didFailWithError:(NSError *)error{
[rData release];
[connection release];
}
-(void)connectionDidFinishLoading:(NSURLConnection *)connection{
NSString *myVar = [[[NSString alloc] initWithData:rData encoding:NSUTF8StringEncoding] autorelease];
NSArray *storage =[[(NSDictionary *)myVar objectForKey:@"data"]retain]; // this line seems to be the error
NSLog(@"%i", [storage count]);

When I run this code, I got an error “unrecognized selector sent to instance 0x748b800”. Do you think that the line I’ve marked really gives error? How can I fix it? Thank you for your help in advance. 😉

  • 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-06-11T12:11:41+00:00Added an answer on June 11, 2026 at 12:11 pm

    Add JSON kit in your project.

    Declare a method in your viewController.h file

    -(void)JsonParsing:(NSString *)string;
    

    Then import

    #import "SBJSON.h"
    #import "JSON.h"
    

    in your viewController.m file and

    -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
    {
        [self.rData appendData:data];
    }
    -(void)connection: (NSURLConnection *)connection didFailWithError:(NSError *)error
    {
        [rData release];
        [connection release];
    }
    -(void)connectionDidFinishLoading:(NSURLConnection *)connection
     {
        NSString *theXMLString = [[NSString alloc]initWithBytes:[self.rData mutableBytes] length:[self.rData length] encoding:NSUTF8StringEncoding];
        [self JsonParsing:theXMLString];
     }
    

    Then parse your string here –

    -(void)JsonParsing:(NSString *)string
    {
        SBJSON *jsonObject = [[SBJSON alloc]init];
        NSArray *dataArray = [[NSArray alloc]init];
        dataArray = [jsonObject objectWithString:string];
        NSLog(@"%d", [dataArray count]);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone. I am working on a Firefox extension, and I want to
Good day everyone! I would like to ask for help regarding my code here.
Good day everyone. I would like to ask for help regarding my code to
Good day! I just want to ask if an InfoBubble can have a listener.
Good day, Stack Overflow. I have a homework assignment that I'm working on this
Good day! My regular expression is really bad and I would like to ask
Good day everyone I need to execute command on linux machine this command is
Good Day everyone!! One question.. or two.. Is it possible to use Expression Blend
Good day everyone. I am creating a calendar component, and I'm working in the
Good day everyone! Working on aprojectmI had to start working with Google Spereadsheet interface

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.