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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:22:34+00:00 2026-06-01T09:22:34+00:00

I am trying to create a mapping for the following JSON data. { Calls:

  • 0

I am trying to create a mapping for the following JSON data.

{
  "Calls": [
    {
      "id": "18",
      "parent_id": "0",
      "status": "completed",
    },
    {
      "id": "19",
      "parent_id": "0",
      "status": "completed",
    },
}

I am using the following methods to map and handle the response from the delegate. When I run this the didLoadObjects method is never hit and nothing is logged. Also, I am positive that the URL is correct and the URL returns the JSON i posted above.

- (void)viewDidLoad
{
    [super viewDidLoad];

    RKLogConfigureByName("RestKit/*", RKLogLevelTrace);

    RKObjectMapping *callMapping = [RKObjectMapping mappingForClass:[YCMDCall class]];

    [callMapping mapKeyPath:@"id" toAttribute:@"call_id"];
    [callMapping mapKeyPath:@"parent_id" toAttribute:@"parent_id"];
    [callMapping mapKeyPath:@"status" toAttribute:@"status"];

    RKObjectManager *manager = [[RKObjectManager sharedManager] managerWithBaseURL:@"http://MYBASEURL/"];
    [manager.mappingProvider setMapping:callMapping forKeyPath:@"Calls"];
    [manager loadObjectsAtResourcePath:@"RESTOFURL" objectMapping:callMapping delegate:self];
}

- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects
{
    NSLog(@"Load collection of Articles: %@", objects);
}

- (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error
{
    NSLog(@"Oh no! Error: %@", [error localizedDescription]);
}

Also, if anyone could provide an example or point me in the right direction to import these results into a TableViewController. Thanks in advance for any help.

@interface YCMDCall : NSObject

@property (nonatomic, retain) NSString* call_id;
@property (nonatomic, retain) NSNumber* parent_id;
@property (nonatomic, retain) NSString* status;

@end



@implementation YCMDCall

@synthesize call_id;
@synthesize parent_id;
@synthesize status;

@end
  • 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-01T09:22:36+00:00Added an answer on June 1, 2026 at 9:22 am

    You can save reterned NSArray in a Session Object who is a singleton, and then post a notification :

    [MySessionObject getInstance].list = objects;
    [[NSNotificationCenter defaultCenter] postNotificationName:@"YCMDCallSuccess" object: nil];
    

    In your view, you can observe this notification :

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onYCMDCallSuccess) name:@"YCMDCallSuccess" object:nil];
    

    In your onYCMDCallSuccess method you can access data in your Session Object

    // For exemple
    self.myList=[MySessionObject getInstance].list;
    

    You can see this post for more details : RestKit 0.9.3 app Structure

    Hope it can help you.

    Edit :
    If your call is directly in your view controller, see if you added RKObjectLoaderDelegate

     @interface MyTableViewController : UITableViewController <RKObjectLoaderDelegate>
    

    if not, Your callback functions will never be called :

    - (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects;
    - (void)objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a mapping file for the following Model using Fluent
I'm trying to create a mapping similar to the following with fluent nhibernate: <class
I'm new to NHibernate and trying to create my first mapping. I have created
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Ok so I am trying create a login script, here I am using PHP5
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
I'm trying to create a simple Spring 3 application and have the following files.
I'm trying to create a regex pattern to match the lines in the following
I'm trying to create a mapping table between two generic (content_type) references, one for
I'm trying to create my first test application with NHibernate following example in NHibernate

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.