// // TestObjc.swift // GlossExample // // Created by DucNT on 3/31/16. // Copyright © 2016 Harlan Kellaway. All rights reserved. // import Gloss class TestObj: Glossy { var msgCode:Int?; var msgContent:NSString?; var result:ResultObj?; required init?(json: JSON) { guard let msgCode:Int = "msgCode" <~~ json, let msgContent:String = "msgContent" <~~ json, let result:ResultObj = "result" <~~ json else { return nil; } self.msgCode = msgCode self.msgContent = msgContent self.result = result } func toJSON() -> JSON? { return nil } } class ResultObj: Glossy { var listThread:[SubListObj]?; var total:Int?; required init?(json: JSON) { guard let listThread:[SubListObj] = "listThread" <~~ json, let total:Int = "total" <~~ json else{ return nil } self.listThread = listThread; self.total = total; } func toJSON() -> JSON? { return nil } } class SubListObj: Glossy { var id:NSString?; var threadId:NSString?; var content:NSString?; var status:Int?; var timeCreate:Int64?; var userId:NSString?; required init?(json: JSON) { guard let id:NSString = "id" <~~ json, let threadId:NSString = "threadId" <~~ json, let content:NSString = "content" <~~ json, let status:Int = "status" <~~ json, let timeCreate:Int64 = "timeCreate" <~~ json, let userId:NSString = "userId" <~~ json else{ return nil } self.id = id; self.threadId = threadId; self.content = content; self.timeCreate = timeCreate; self.userId = userId; self.status = status; } func toJSON() -> JSON? { return nil } }