JsonSerializer.GetMatchingConverter (System.Collections.Generic.IList`1[T] converters, System.Type objectType)

Viewed 257

I am getting this error occasionally in multiple areas while deserializing the API response

Stack traces

Newtonsoft.Json JsonSerializer.GetMatchingConverter (System.Collections.Generic.IList`1[T] converters, System.Type objectType)

Newtonsoft.Json.Serialization DefaultContractResolver.InitializeContract (Newtonsoft.Json.Serialization.JsonContract contract)

Newtonsoft.Json.Serialization DefaultContractResolver.CreateObjectContract (System.Type objectType)

Newtonsoft.Json.Serialization DefaultContractResolver.CreateContract (System.Type objectType)

System.Collections.Concurrent ConcurrentDictionary2[TKey,TValue].GetOrAdd (TKey key, System.Func2[T,TResult] valueFactory)

Newtonsoft.Json.Utilities ThreadSafeStore`2[TKey,TValue].Get (TKey key)

Newtonsoft.Json.Serialization DefaultContractResolver.ResolveContract (System.Type type)

Newtonsoft.Json.Serialization JsonSerializerInternalReader.GetContractSafe (System.Type type)

Newtonsoft.Json.Serialization JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent)

Newtonsoft.Json JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType)

Newtonsoft.Json JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType)

Newtonsoft.Json JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings)

Newtonsoft.Json JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings)

Newtonsoft.Json JsonConvert.DeserializeObject[T] (System.String value)

TSP.APIService UsersService.GetDistrictsAndWards ()

            try 
            { 
                var response = (HttpResponseMessage)await _restClient.CallApiAsync(EndPoint, "GET", null, HeaderParams); 
                if (response != null && (response.IsSuccessStatusCode)) 
                { 
                    var content = await response.Content.ReadAsStringAsync(); 
                    var result = JsonConvert.DeserializeObject<APIResult<List<DistrictsandWardsResponse>>>(content); 
                    return result;
                } 
                else 
                { 
                    ViewModelLocator.TrackAPIException(EndPoint, httpResponse); 
                } 
                return default(APIResult<List<DistrictsandWardsResponse>>); 
            } 
            catch (Exception ex) 
            {
                ViewModelLocator.TrackException(ex);
            }
    
0 Answers
Related