Skip to content

Commit

Permalink
Merge pull request #1 from insanoid/release-v0.0.2
Browse files Browse the repository at this point in the history
Release v0.0.2 Fixes
  • Loading branch information
Karthikeya Udupa KM committed Oct 24, 2015
2 parents dda35f3 + 54fa7dc commit 8029a28
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 194 deletions.
Binary file added Graphics/SwiftyJSON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Graphics/SwiftyJSON.psd
Binary file not shown.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SwiftyJSONAccelerator

**(Alpha v0.0.2)**

[Download the .app (v0.0.1)](https://github.com/insanoid/SwiftyJSONAccelerator/releases/download/v0.0.1/SwiftyJSONAccelerator.zip)

![Logo](https://raw.githubusercontent.com/insanoid/SwiftyJSONAccelerator/master/SwiftyJSONAccelerator/Assets.xcassets/AppIcon.appiconset/Icon_32x32%402x.png)
Expand All @@ -24,13 +26,12 @@ Currently, the pattern is very similar to its Objective-C counterpart. It genera

## TODO

- Instead of taking a single element consider merging all the elements and decide what to do as a while.
- Should also consider the case where the type is an `[[AnyObject],[AnyObject]...]` while handling arrays.
- Handle blank array a bit better.
- Better User Interface and icon.
- Generate both `struct` and `class`.
- Support for generation of models that do not need SwiftyJSON.
- Add tests and integrate with Travis CI.
- Create a Xcode plugin and a command line executor.

---

Expand Down
42 changes: 29 additions & 13 deletions SwiftyJSONAccelerator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
objects = {

/* Begin PBXBuildFile section */
9341A14A1BD6E5FE0048CE2C /* SJModelGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A1491BD6E5FE0048CE2C /* SJModelGenerator.swift */; settings = {ASSET_TAGS = (); }; };
9341A14C1BD6E6300048CE2C /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A14B1BD6E6300048CE2C /* SwiftyJSON.swift */; settings = {ASSET_TAGS = (); }; };
9341A14F1BD6E7290048CE2C /* BaseTemplate.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9341A14E1BD6E7290048CE2C /* BaseTemplate.txt */; settings = {ASSET_TAGS = (); }; };
9341A1521BD6E9EC0048CE2C /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A14B1BD6E6300048CE2C /* SwiftyJSON.swift */; settings = {ASSET_TAGS = (); }; };
9361FD141BD18558001ED533 /* LineNumberRulerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9361FD131BD18558001ED533 /* LineNumberRulerView.swift */; settings = {ASSET_TAGS = (); }; };
9362F8661BD07DBA0001372E /* JSONHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9362F8651BD07DBA0001372E /* JSONHelperTests.swift */; settings = {ASSET_TAGS = (); }; };
93CDE7721BD1A00B00B5B234 /* SJTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CDE7711BD1A00B00B5B234 /* SJTextView.swift */; settings = {ASSET_TAGS = (); }; };
9341A14A1BD6E5FE0048CE2C /* SJModelGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A1491BD6E5FE0048CE2C /* SJModelGenerator.swift */; };
9341A14C1BD6E6300048CE2C /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A14B1BD6E6300048CE2C /* SwiftyJSON.swift */; };
9341A14F1BD6E7290048CE2C /* BaseTemplate.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9341A14E1BD6E7290048CE2C /* BaseTemplate.txt */; };
9341A1521BD6E9EC0048CE2C /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9341A14B1BD6E6300048CE2C /* SwiftyJSON.swift */; };
9361FD141BD18558001ED533 /* LineNumberRulerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9361FD131BD18558001ED533 /* LineNumberRulerView.swift */; };
9362F8661BD07DBA0001372E /* JSONHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9362F8651BD07DBA0001372E /* JSONHelperTests.swift */; };
93CDE7721BD1A00B00B5B234 /* SJTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CDE7711BD1A00B00B5B234 /* SJTextView.swift */; };
93F174431BD0707D007E7DFC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F174421BD0707D007E7DFC /* AppDelegate.swift */; };
93F174451BD0707D007E7DFC /* SJEditorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F174441BD0707D007E7DFC /* SJEditorViewController.swift */; };
93F174471BD0707D007E7DFC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93F174461BD0707D007E7DFC /* Assets.xcassets */; };
93F1744A1BD0707D007E7DFC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93F174481BD0707D007E7DFC /* Main.storyboard */; };
93F174551BD0707D007E7DFC /* SwiftyJSONAcceleratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F174541BD0707D007E7DFC /* SwiftyJSONAcceleratorTests.swift */; };
93F174601BD070AA007E7DFC /* JSONHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F1745F1BD070AA007E7DFC /* JSONHelper.swift */; settings = {ASSET_TAGS = (); }; };
93F174601BD070AA007E7DFC /* JSONHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F1745F1BD070AA007E7DFC /* JSONHelper.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -86,6 +86,25 @@
name = "External Libraries";
sourceTree = "<group>";
};
93A1264E1BDB8B04002A3B11 /* Model Generation */ = {
isa = PBXGroup;
children = (
93F1745F1BD070AA007E7DFC /* JSONHelper.swift */,
9341A1491BD6E5FE0048CE2C /* SJModelGenerator.swift */,
);
name = "Model Generation";
sourceTree = "<group>";
};
93A1264F1BDB8B14002A3B11 /* Application Interface */ = {
isa = PBXGroup;
children = (
93F174421BD0707D007E7DFC /* AppDelegate.swift */,
93F174441BD0707D007E7DFC /* SJEditorViewController.swift */,
93CDE7711BD1A00B00B5B234 /* SJTextView.swift */,
);
name = "Application Interface";
sourceTree = "<group>";
};
93F174361BD0707D007E7DFC = {
isa = PBXGroup;
children = (
Expand All @@ -108,12 +127,9 @@
isa = PBXGroup;
children = (
9362D3BC1BD8398A00B927D6 /* External Libraries */,
93A1264E1BDB8B04002A3B11 /* Model Generation */,
9341A14D1BD6E6EF0048CE2C /* Base Files */,
93F174421BD0707D007E7DFC /* AppDelegate.swift */,
93F174441BD0707D007E7DFC /* SJEditorViewController.swift */,
93F1745F1BD070AA007E7DFC /* JSONHelper.swift */,
93CDE7711BD1A00B00B5B234 /* SJTextView.swift */,
9341A1491BD6E5FE0048CE2C /* SJModelGenerator.swift */,
93A1264F1BDB8B14002A3B11 /* Application Interface */,
93F174461BD0707D007E7DFC /* Assets.xcassets */,
93F174481BD0707D007E7DFC /* Main.storyboard */,
93F1744B1BD0707D007E7DFC /* Info.plist */,
Expand Down
9 changes: 2 additions & 7 deletions SwiftyJSONAccelerator/Base Files/BaseTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Copyright (c) __MyCompanyName__. All rights reserved.
//

import Foundation
import Foundation{INCLUDE_SWIFTY}

public {OBJECT_KIND} {OBJECT_NAME}: NSObject, NSCoding {

Expand All @@ -18,9 +18,7 @@ public {OBJECT_KIND} {OBJECT_NAME}: NSObject, NSCoding {
// MARK: Initalizers
/**
Initates the class based on the object

- parameter object: The object of either Dictionary or Array kind that was passed.

- returns: An initalized instance of the class.
*/
convenience public init(object: AnyObject) {
Expand All @@ -29,9 +27,7 @@ public {OBJECT_KIND} {OBJECT_NAME}: NSObject, NSCoding {

/**
Initates the class based on the JSON that was passed.

- parameter json: JSON object from SwiftyJSON.

- returns: An initalized instance of the class.
*/
public init(json: JSON) {
Expand All @@ -40,7 +36,6 @@ public {OBJECT_KIND} {OBJECT_NAME}: NSObject, NSCoding {

/**
Generates description of the object in the form of a NSDictionary.

- returns: A Key value pair containing all valid values in the object.
*/
public func dictionaryRepresentation() -> [String : AnyObject ] {
Expand All @@ -60,4 +55,4 @@ public {OBJECT_KIND} {OBJECT_NAME}: NSObject, NSCoding {
{ENCODERS}
}

}
}
Loading

0 comments on commit 8029a28

Please sign in to comment.