For my iPhone application, I use RESTful service and get JSON. I found libraries for deserializing this in an NSDictionary. However, I am wondering if there are any libraries for deserializing the JSON / NSDictionary / Property List into my object (arbitrary on my side).
The Java equivalent will be an object-relational matching, although sorting the objects I'm looking for is relatively simple (simple data types, complex relationships, etc.).
I noticed that Objective-C has an introspection, so theoretically this is possible, but I did not find a library for this.
Or is there an easy way to load an object from an NSDictionary / Property List object that does not need to be modified every time the object changes?
For example:
{ "id" : "user1", "name" : "mister foobar" "age" : 20 }
loaded into an object
@interface User : NSObject { NSString *id; NSString *name; int *age; }
json rest objective-c iphone orm
pschang
source share