title: Decode Json Data using JsonDecoder and Alamofire
body: <p>I am trying decode Json data into my Model.
  This is my model</p>
  
  <pre><code>struct Devices : Codable {
  var id :String?
  var description :String?
  var status : Int?
  </code></pre>
  
  <p>}</p>
  
  <pre><code> var heroes = Devices()
      print(DeviceId)
      let loginParam: [String: Any] = [
          "id": DeviceId
      ]
      let manager = Alamofire.SessionManager.default
      manager.session.configuration.timeoutIntervalForRequest = 5
      manager.request("http://13.13.13.004/website/api/Customer/DeviceControl", method: .post , parameters: loginParam, encoding: JSONEncoding.prettyPrinted)
          .responseData { response in
              let json = response.data
  
              do{
                  let decoder = JSONDecoder()
                  //using the array to put values
                  heroes = try decoder.decode(Devices.self, from: json!)
  
              }catch let err{
                  print(err)
              }
  </code></pre>
  
  <p>this code doesn't get in catch block.
  But heroes values return nill.
  When ı try use <strong>NsDictionary</strong> 
  Its give result.</p>