Automatic generate Objective-C code by JSON string.Support <NSCoding> .
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
AutomaticCoder.xcodeproj fix bug( not finish yet) Aug 30, 2015
AutomaticCoder add edit menu Aug 30, 2015
.gitignore init project Aug 20, 2012 clean commit Aug 22, 2012 add screenshot Apr 10, 2013
icons.icns 我也忘了更新什么了.. Sep 4, 2012

Automatic Coder

截图1 截图2


Automatic generate Objective-C code by JSON string.Support <NSCoding>.

Do you want other code?Tell me i'll add it.


Xcode 4.4 or later

Mac OS 10.7 or later


    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@""]];
    NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
    NSDictionary *json = [data objectFromJSONData];
    //init object
    Person *person = [[Person alloc] initWithJson:json];
    NSLog(@"%@",;                //
    NSLog(@"%@",person.male?@"男":@"女");     //男
    NSLog(@"%ld",person.girlFriends.count);   //3
    //write to file
    BOOL result = [NSKeyedArchiver archiveRootObject:person toFile:@"./"];
    NSLog(@"%@",result?@"success":@"failure");   //success

    //read from file
    Person *thePerson = [NSKeyedUnarchiver unarchiveObjectWithFile:@"./"];
    NSLog(@"%@",;                //
    NSLog(@"%@",thePerson.male?@"男":@"女");     //男
    NSLog(@"%ld",thePerson.girlFriends.count);   ///3