Skip to content
OS X utility that converts a JSON object to a Foundation object that can be used in Cocoa/Cocoa Touch development.
Swift
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
JSONtoFoundation.xcodeproj
JSONtoFoundation
JSONtoFoundationTests
.gitignore
LICENSE
README.md

README.md

JSONtoFoundation

OS X utility that converts a JSON object to a Foundation object that can be used in Cocoa/Cocoa Touch development.

Example

JSON Object:

{"id":"18","device_type":"Mobile Card Reader","serial_number":"xxx000xxx"}

Objective-C Output:

#import <Foundation/Foundation.h>

@interface Device : NSObject

@property (nonatomic,strong)NSString *deviceType;
@property (nonatomic,strong)NSString *id;
@property (nonatomic,strong)NSString *serialNumber;

@end

Swift Output:

import Foundation

class test: NSObject {
   var deviceType: String?
   var id: String?
   var serialNumber: String?

}

Configuration: To have your name added to the templates simply edit the user name in the app's preferences window.

You can’t perform that action at this time.