You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here my response { "Time" : "22\/10\/2019 10:40:57", "ListValue" : null, "Message" : "Can not found data!", "Code" : "01" }
and request Alamofire.request(apiRouter) .debugLog().validate() .responseArray(keyPath: "ListValue") { (response: DataResponse<[T]>) in if let status = response.response?.statusCode { switch(status) { case 200: guard response.result.isSuccess else { let err: BaseResponseError = BaseResponseError.init(NetworkErrorType.HTTP_ERROR, String(-2), "Error") completion(nil, err) return } completion(response.result.value,nil) default: let err: BaseResponseError = BaseResponseError.init(NetworkErrorType.HTTP_ERROR, String(-2), "Error ") completion(nil, err) } } }
when I execute , i get error ObjectMapper failed to serialize response
but { "Time" : "22\/10\/2019 10:40:57", "ListValue" : [], "Message" : "Can not found data!", "Code" : "01" } work fine
my problem is "ListValue" : [] and "ListValue" : null
Please help me
The text was updated successfully, but these errors were encountered:
Here my response
{ "Time" : "22\/10\/2019 10:40:57", "ListValue" : null, "Message" : "Can not found data!", "Code" : "01" }
and request
Alamofire.request(apiRouter) .debugLog().validate() .responseArray(keyPath: "ListValue") { (response: DataResponse<[T]>) in if let status = response.response?.statusCode { switch(status) { case 200: guard response.result.isSuccess else { let err: BaseResponseError = BaseResponseError.init(NetworkErrorType.HTTP_ERROR, String(-2), "Error") completion(nil, err) return } completion(response.result.value,nil) default: let err: BaseResponseError = BaseResponseError.init(NetworkErrorType.HTTP_ERROR, String(-2), "Error ") completion(nil, err) } } }
when I execute , i get error ObjectMapper failed to serialize response
but
{ "Time" : "22\/10\/2019 10:40:57", "ListValue" : [], "Message" : "Can not found data!", "Code" : "01" }
work finemy problem is
"ListValue" : []
and"ListValue" : null
Please help me
The text was updated successfully, but these errors were encountered: