Unable to cast object of type ‘Nest.Json.Linq.JObject’ to type ‘Newtonsoft.Json.Linq.JObject’.

704 viewsSoftware & Technologyc#

I am trying to parse a response from Elasticsearch. The object is a jObject and I am trying to cast it to this but i get the following exception.

I have the Nest nuget package referenced but when I check the namespace, Im not able to add a using for “Nest.Json.Linq” for some reason. The newtonsoft version is the only one I seem to be able to reference.

Edited question