fmscode / JSONtoFoundation

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

License:MIT License


Languages

Language:Swift 100.0%