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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:54:20+00:00 2026-05-29T08:54:20+00:00

Is it possible to deserialize an NSString of JSON into objects via RestKit? I

  • 0

Is it possible to deserialize an NSString of JSON into objects via RestKit? I checked the API list here and could not find something that would serve for this purpose. The closest I could find are the various parser classes that return NSDictionary after parsing the input. I assume RestKit uses these parsers after downloading the response so my thinking is that the functionality is available somewhere in RestKit but not exposed publicly.

If I am not missing anything and this functionality is not exposed, what would be the alternatives? Two obvious ones do not look very promising: Get the resulting NSDictionary and try to deserialize myself (effectively reimplementing RestKit) or try to dive into RestKit source and see if this can be somehow exposed (looks tedious and error prone).

Thanks in advance for any help.

PS: The idea is that a string property on a deserialized object is actually the JSON representation of another set of objects (embedded JSON in a sense) and it is deserialized on demand during runtime.

  • 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-29T08:54:21+00:00Added an answer on May 29, 2026 at 8:54 am

    Pretty “simple”:

    NSString *stringJSON;
    ...
    
    RKJSONParserJSONKit *parser;
    NSError *error= nil;
    parser= [[[RKJSONParserJSONKit alloc] init] autorelease]; 
    MyManagedObject *target;
    target= [MyManagedObject object];
    
    NSDictionary *objectAsDictionary;
    RKObjectMapper* mapper;
    objectAsDictionary= [parser objectFromString:stringJSON error:&error];
    mapper = [RKObjectMapper mapperWithObject:objectAsDictionary 
                              mappingProvider:[RKObjectManager sharedManager].mappingProvider];
    mapper.targetObject = target;
    RKObjectMappingResult* result = [mapper performMapping];
    NSLog(@"%@", [result asObject]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems that serializing Entity Framework objects into JSON is not possible using either
Is it possible to Deserialize the following piece of XML into a Dictionary<int,string> object?
Using Protobuf-Net, I see that it does not seem possible to deserialize a class
Is it possible to deserialize this XML into an object marked with the DataContract
I want to deserialize a JSON string which does not necessarily contain data for
I have JSON response from Facebook, which I don't want to deserialize into a
With Jackson json library, it is possible to deserialize object through the use of
Possible Duplicate: Deserializing JSON into an object with Json.NET Any ideas of how to
Is it possible to serialize and deserialize a class in C++? I've been using
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should

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.