An exception of type 'System.OutOfMemoryException' occurred in Newtonsoft.Json.dll but was not handled in user code

I am getting an OutOfMemoryException when deserializing a response of about 27MB from the API. It correctly deserializes DTOs that are smaller. Any ideas?

var resultObject = JsonConvert.DeserializeObject<T>(response.Content.ReadAsStringAsync().Result);

      

+3


source to share





All Articles