     
 }
 
-public protocol Decodable {
-    
-    /**
-    Array of decoding functions
-    */
-    func decoders() -> [JSON -> ()]
-    
-}
-
 public protocol Encodable {
     
     /**
     Array of encoded values as JSON
     */
     func encoders() -> [JSON?]
+}
+
+public class Gloss {
     
     /**
-    JSON representation of object
+    JSON representation of model
     */
-    func toJSON() -> JSON
-}
-
-public class Gloss : Glossy, Encodable {
-    
-    // MARK: - Initialization
-    
-    required public init(json: JSON) {
-        applyDecoders(self.decoders())(json)
-    }
-    
-    // MARK: - Protocol conformance
-    
-    // MARK: Decodable
-    
-    public func decoders() -> [JSON -> ()] {
-        return []
-    }
-    
-    // MARK: Encodable
-    
-    public func encoders() -> [JSON?] {
-        return []
-    }
-    
-    public func toJSON() -> JSON {
+    public static func toJSON<T: Encodable>(model: T) -> JSON {
         var json: JSON = [:]
         
-        for encoder in self.encoders() {
+        for encoder in model.encoders() {
             if let encoder = encoder {
                 json.add(encoder)
             }


public typealias JSON = [String : AnyObject]

public protocol Glossy: Decodable {
    
    /**
    Designated initializer to create new object

        return json
    }
    
}
