Last active
April 6, 2016 07:29
-
-
Save flandy84/62b7a0e552f73e8ee4aa20042f1e8c0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public class LoginResponse { | |
public var text: String = "" | |
public init (text: String) { | |
self.text = text | |
} | |
public init(json:JSON) { | |
text = json["user"]["text"].stringValue | |
} | |
public func toJSON() -> JSON{ | |
// | |
// { | |
// "user" : { | |
// "text" : "Hallo <USER>", | |
// } | |
// } | |
let bodyJSONDictionary = JSON( | |
[ "user" : | |
[ | |
"text" : text, | |
] | |
]) | |
return bodyJSONDictionary | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment