Related questions
iOS JSON serialization for NSObject-based classes
I'd like to JSON-serialize my own custom classes. I'm working in Objective-C / iOS5.
I'd like something to do the following:
Person* person = [self getPerson ]; // Any custom object, NOT based on NSDictionary
NSString* jsonRepresentation = [JsonWriter stringWithObject:person ];
Person* clone = [JsonReader objectFromJson: …
NSObject custom init with object/parameters
What i'm trying to accomplish is something like
Person *person1 = [[Person alloc]initWithDict:dict];
and then in the NSObject "Person", have something like:
-(void)initWithDict:(NSDictionary*)dict{
self.name = [dict objectForKey:@"Name"];
self.age = [dict objectForKey:@"Age"];
return (Person …
What is __NSArrayI and __NSArrayM? How to convert to NSArray?
What is __NSArrayI and __NSArrayM?
__NSArrayI(or M) cause "unrecognized selector" error.
How to convert to NSArray?
I did test to parse json, twitter api.
http://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi
==> works …