title: How to pass a class type, that conforms to protocol
body: <p>I'm trying to make a generic sterilizer function using SwitfyJson.
  Currently every where I'm getting server response, I'm parsing is like this:</p>
  
  <pre><code>       let json = JSON(data : networkResponse.data!)
          let usersJson = json["data"]
          var users = [User]()
  
          for (_,subJson):(String, JSON) in usersJson {
              let user = User(json: subJson)
              users.append(user)
          }
  </code></pre>
  
  <p>Now this is repeatedly every were I'm getting a response. 
  I'm trying to use a generic function insted. It should look somthing like this:</p>
  
  <pre><code>    protocol Serializable {
          init(json: JSON)
      }
  
         func serializeToArray(data: NSData, serializable:  Serializable)-&gt;serializable {
  
              let json = JSON(data : data)
              let jsonObjects = json["data"]
              var serializedObjects = [serializable.classType]()
  
              for (_,subJson):(String, JSON) in jsonObjects {
                  let serializedObject = User(json: subJson)
                  serializedObjects.append(user)
              }
  
                return serializedObjects
          }
  </code></pre>
  
  <p>But this "classType" is not available in Swift.
  Is there a way I can achieve this?</p>