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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:36:27+00:00 2026-05-22T20:36:27+00:00

I am looking for a library or framework that does JSON to Objective-C relational

  • 0

I am looking for a library or framework that does JSON to Objective-C relational object mapping.
i.e. I need to map JSON containing objects, array of objects and dictionaries of objects to my custom objects.

something like:

DataObject {
    "user" : {
        "name":"Peter",
        "id":1234
    }
    "place": "UK"
    "job": {
        "title" : "CTO",
        "salary" : 1234567
    }
    "employess": [
        {
            "name":"Carlton",
            "id":1235
        },
        {
            "name":"Hugo",
            "id":12346
        }]
}

So there is a DataObject a UserObject and an employees array consisting of UserObjects.
I would like for the mapping from the JSON to my DataObject to happen “automatically”, of course meant as I would like to describe the objects and there relations in the Object class and have the mapping done from this, instead of manually mapping each nested object.
(First level native objective-c properties are easily done with setValue:forKey and other KVO methods, but from there on it gets complicated).

I have been testing out RestKit but it seems there is no way to pick and choose which functionality you need from that framework, it is either all of it or none of it, and I do find it does too much for my needs.

Are anyone familiar with a library etc. out there that can do this?

Thank you 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-05-22T20:36:27+00:00Added an answer on May 22, 2026 at 8:36 pm

    What you have posted above isn’t valid JSON. If you made it valid JSON what you want to do is impossible without a specific schema, eg.

    {
        "DataObject": {
            "user": {
                "name": "Peter",
                "id": 1234
            },
            "place": "UK",
            "job": {
                "title": "CTO",
                "salary": 1234567
            }
        }
    }
    

    Is Dataobject a dictionary or an Object? What about User or Job? What is User is an instance of NSUser and job is an NSDictionary?

    On the other hand, if you have a known schema:-

    [
        {
            "class": "DataObject",
            "properties": {
                "user": {
                    "class": "User",
                    "properties": {
                        "name": "Peter",
                        "id": 1234
                    }
                },
                "place": "UK",
                "job": {
                    "title": "CTO",
                    "salary": 1234567
                }
            }
        }
    ]
    

    you don’t need a framework as it is trivial to map to your objects yourself once you have valid JSON. Pseudocode:-

    createWithDict(dict) {
        var newOb = create new(dict["class"]);
        dict.properties.each( val, key ) {
            if(val is dictionary && val.hasproperty("class"))
                val = createWithDict(val)
            newOb[key] = val
        }   
        return newOb;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for an Objective-C library for an iOS app that will parse and
I'm looking for a library compatible with microsoft.net framework that allows the creation and
I spent about a week looking for any library or framework that allows rich
I'm looking for a library / framework that would allow me to easily achieve
I am looking for XML/XHTML Java library/framework that can perform the following two tasks
I'm looking for a library or framework and webserver that can run applications in
I am looking for a STABLE FTP library for Compact Framework. I would prefer
I am looking for a reliable P2P framework or library, preferrably natively written in
I am looking for a library that will allow me to look up the
I'm looking for a library that has functionality similar to Perl's WWW::Mechanize , but

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.