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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:25:58+00:00 2026-06-10T08:25:58+00:00

I have a JSON response that I turn into a Dictionary like so: NSError

  • 0

I have a JSON response that I turn into a Dictionary like so:

NSError *error;
self.restKitResponseDict = [NSDictionary dictionaryWithDictionary:[NSJSONSerialization JSONObjectWithData:response.body options:0 error:&error]];

I have a core data class that has the following attributes/properties:

name
image_url

When I log the restKitResponseDict from above I see that image_url is listed as "image_url" like this:

name = Rock;
"image_url" = "http://f.cl.ly/items/122s3f1M1E1p432B211Q/catstronaut.jpg";

Is this why KVC is crashing on

[CoreDataClass setValuesForKeysWithDictionary:self.restKitResponseDict];

like this:

'[<CoreDataClass 0x14132c> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key image_url.'

Do the quotes matter? Should I ask my server guy to get rid of the underscore that’s likely causing it?

Core Data Class:

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@interface CoreDataClass : NSManagedObject

@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * image_url;

@end

@implementation CoreDataClass

@dynamic name;
@dynamic image_url;

@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-10T08:25:59+00:00Added an answer on June 10, 2026 at 8:25 am

    You are sending the method to the class object:

    [CoreDataClass setValuesForKeysWithDictionary:self.restKitResponseDict];
    

    when you probably want to send it to the actual CoreDataClass instance:

    [coreDataClassObject setValuesForKeysWithDictionary:self.restKitResponseDict];
    

    EDIT

    what’s the simplest way to init the object from the class? – Eric

    It’s a subclass of NSManagedObject, so you use the normal Core Data methods. One way to create a new object:

    CoreDataClass *coreDataObject = [NSEntityDescription
        insertNewObjectForEntityForName:@"YOUR_ENTITY_NAME"
        inManagedObjectContext:managedObjectContext];
    

    If you need basic information about using Core Data, see the Core Data Programming Guide: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/coredata/cdProgrammingGuide.html#//apple_ref/doc/uid/TP30001200-SW1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSON response that returns an array like so: [1, 1] [2,
I have a JSON response from a web server that looks like this: {success:true,
I have a JSON response that is formatted from my C# WebMethod using the
I have a json response like: { total: 2, success: true, rows: [ {a1_id:7847TK10,
If i have this json response {error:repeated} Why the alert is not showed? It
I have a JSON response from a web service that I need to be
I have an array of data that is returned as a JSON response. The
I'm fetching a JSON response and with that response, I have two values: Air
I currently have a UITableViewController that parses a JSON response (using TouchJSON) fired asynchronously
I have a JSon response that contains lots of \u003c or \u00252 or other

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.