I have a console application pulling data from Workfront. It's been working for a while, until a couple weeks ago it started throwing errors and aborting the application. I have narrowed down the issue and it seems like the problem is being generated when I try to parse out a string into a JToken. This is what I'm trying to do:
private JToken ReadResponse(Stream stream) {
StreamReader reader = new StreamReader(stream);
string body = reader.ReadToEnd();
JToken test = JObject.Parse(body);
return test;
}
This is the error I get:
[Newtonsoft.Json.JsonReaderException] {"Unexpected end of content while loading JObject. Path 'data[3700]', line 1, position 12298025."} Newtonsoft.Json.JsonReaderException
Any ideas on why is this happening? Thanks for the help in advance!