title: Error while trying to Parsing API Response with Alamofire
body: <p><strong>API Response:</strong></p>
  <pre><code>{
      &quot;data&quot;: {
          &quot;customer_id&quot;: &quot;fb5056fe-d7cf-4b5e-3e32-08d9568a3822&quot;,
          &quot;source&quot;: &quot;self&quot;,
          &quot;type&quot;: &quot;customer&quot;,
          &quot;language&quot;: &quot;en&quot;,
          &quot;identity_card&quot;: {
              &quot;first_name&quot;: &quot;abdulrahman&quot;,
              &quot;middle_name&quot;: &quot;ahmed&quot;,
              &quot;last_name&quot;: &quot;ali&quot;,
              &quot;localized_first_name&quot;: &quot;abdulrahman&quot;,
              &quot;localized_middle_name&quot;: &quot;ahmed&quot;,
              &quot;localized_last_name&quot;: &quot;ali&quot;,
              &quot;identity_card_number_last_digits&quot;: &quot;4416&quot;,
              &quot;date_of_birth&quot;: &quot;1994-05-15T00:00:00&quot;,
              &quot;date_of_birth_calendar_type&quot;: &quot;gregorian&quot;
          },
          &quot;income&quot;: [],
          &quot;identity_verifications&quot;: [
              null
          ],
          &quot;is_identity_verification_complete&quot;: false,
          &quot;is_address_complete&quot;: false,
          &quot;is_income_complete&quot;: false,
          &quot;is_usage_complete&quot;: false,
          &quot;is_employment_complete&quot;: false,
          &quot;customer_status&quot;: 3,
          &quot;customer_status_description&quot;: &quot;inactive&quot;,
          &quot;wallet_status&quot;: 0,
          &quot;wallet_status_description&quot;: &quot;pending&quot;
      }
  }
  </code></pre>
  <p><strong>My model:</strong></p>
  <pre><code>struct cst_Value : Codable {
      
      let address : cst_Addres?
      let employment : cst_Employment?
      let income : [cst_Income]?
      let usage : cst_Usage?
      let identityVerification : [cst_IdentityVerification]?
      
      let customer_id : String?
      let source : String?
      let type : String?
      let language : String?
      let email : String?
      let phone_number : String?
      let identity_card : cst_IdentityCard?
      let is_identity_verification_complete : Bool?
      let is_address_complete : Bool?
      let is_income_complete : Bool?
      let is_usage_complete : Bool?
      let is_employment_complete : Bool?
      let status : String?
      
      enum CodingKeys: String, CodingKey {
          case customer_id = &quot;customer_id&quot;
          case source = &quot;source&quot;
          case type = &quot;type&quot;
          case language = &quot;language&quot;
          case email = &quot;email&quot;
          case phone_number = &quot;phone_number&quot;
          case identity_card = &quot;identity_card&quot;
          case is_identity_verification_complete = &quot;is_identity_verification_complete&quot;
          case is_address_complete = &quot;is_address_complete&quot;
          case is_income_complete = &quot;is_income_complete&quot;
          case is_usage_complete = &quot;is_usage_complete&quot;
          case is_employment_complete  = &quot;is_employment_complete&quot;
          case status = &quot;status&quot;
          
          case address = &quot;address&quot;
          case employment = &quot;employment&quot;
          case income = &quot;income&quot;
          case usage = &quot;usage&quot;
          case identityVerification = &quot;identity_verifications&quot;
      }
      
      init(from decoder: Decoder) throws {
          let values = try decoder.container(keyedBy: CodingKeys.self)
          customer_id = try values.decodeIfPresent(String.self, forKey: .customer_id)
          source = try values.decodeIfPresent(String.self, forKey: .source)
          type = try values.decodeIfPresent(String.self, forKey: .type)
          language = try values.decodeIfPresent(String.self, forKey: .language)
          email = try values.decodeIfPresent(String.self, forKey: .email)
          phone_number = try values.decodeIfPresent(String.self, forKey: .phone_number)
          identity_card = try values.decodeIfPresent(cst_IdentityCard.self, forKey: .identity_card)
          is_identity_verification_complete = try values.decodeIfPresent(Bool.self, forKey: .is_identity_verification_complete)
          is_address_complete = try values.decodeIfPresent(Bool.self, forKey: .is_address_complete)
          is_income_complete = try values.decodeIfPresent(Bool.self, forKey: .is_income_complete)
          is_usage_complete = try values.decodeIfPresent(Bool.self, forKey: .is_usage_complete)
          is_employment_complete = try values.decodeIfPresent(Bool.self, forKey: .is_employment_complete)
          status = try values.decodeIfPresent(String.self, forKey: .status)
          address = try values.decodeIfPresent(cst_Addres.self, forKey: .address)
          employment = try values.decodeIfPresent(cst_Employment.self, forKey: .employment)
          income = try values.decodeIfPresent([cst_Income].self, forKey: .income)
          usage = try values.decodeIfPresent(cst_Usage.self, forKey: .usage)
          identityVerification = try values.decodeIfPresent([cst_IdentityVerification].self, forKey: .identityVerification)
      }
  }
  
  struct cst_IdentityVerification : Codable {
  
      let identityVerificationMethod : String?
      let identityVerificationStatus : String?
  
  
      enum CodingKeys: String, CodingKey {
          case identityVerificationMethod = &quot;identity_verification_method&quot;
                  case identityVerificationStatus = &quot;identity_verification_status&quot;
      }
      init(from decoder: Decoder) throws {
          let values = try decoder.container(keyedBy: CodingKeys.self)
          identityVerificationMethod = try values.decodeIfPresent(String.self, forKey: .identityVerificationMethod)
          identityVerificationStatus = try values.decodeIfPresent(String.self, forKey: .identityVerificationStatus)
      }
  
  
  }
  </code></pre>
  <p><strong>The Error:</strong></p>
  <pre><code>▿ Optional&lt;AFError&gt;
    ▿ some : AFError
      ▿ responseSerializationFailed : 1 element
        ▿ reason : ResponseSerializationFailureReason
          ▿ decodingFailed : 1 element
            ▿ error : DecodingError
              ▿ valueNotFound : 2 elements
                - .0 : Swift.KeyedDecodingContainer&lt;MobilePay.cst_IdentityVerification.CodingKeys&gt;
                ▿ .1 : Context
                  ▿ codingPath : 3 elements
                    - 0 : CodingKeys(stringValue: &quot;data&quot;, intValue: nil)
                    - 1 : CodingKeys(stringValue: &quot;identity_verifications&quot;, intValue: nil)
                    ▿ 2 : _JSONKey(stringValue: &quot;Index 0&quot;, intValue: 0)
                      - stringValue : &quot;Index 0&quot;
                      ▿ intValue : Optional&lt;Int&gt;
                        - some : 0
                  - debugDescription : &quot;Cannot get keyed decoding container -- found null value instead.&quot;
                  - underlyingError : nil
  </code></pre>