I am an Objective-C newbie coming from the Java world, so I am trying to find out how to do something that would be (relatively) straightforward to do in Java.
In an iPhone app I am accessing a rest webservice that returns JSON. I am using the AFNetworking framework, which provides support for using the NSJSONSerialization class added to iOS 5. I would like to know if there is an "automatic" way to turn the JSON object that is returned into one of my "strongly" typed classes (for example, my UserAccount class).
In other words, I'm trying to do something like:
id json = ... call webservice that returns json, which AFNetworking parses ...
UserAccount myUserAccount = [UserAccount alloc] init];
//then here I'd like something that iterates through all the properties on the
//json object and sets them on the myUserAccount object using key value coding
Is there a straightforward way to accomplish this?