I was wondering if there is any tool which you can paste a JSON
(sample web service response) to generate the NSObject
data model (create .h .m files as well as defining the properties) automatically.
Let's say you have the following simple JSON:
{
"firstName": "Alex",
"lastName": "Morgan"
}
Use the tool to generate person.h & person.m files like this:
@interface Person : NSObject
@property (nonatomic) NSString *firstName;
@property (nonatomic) NSString *lastName;
@end
@implementation Person
@end
Later, just import the files into the project and use them.
Visual Studio has this feature called Paste Special.