Hi Priya,
The LINQ-to-JSON API (JObject, JToken, JArray etc.) is to allow working with JSON without need to know its structure. You can deserialize any arbitrary JSON using JToken.Parse, JObject.Parse, JArray.Parse then examine and manipulate its contents using other methods. LINQ-to-JSON also works well if you just need one or two or more values from the JSON (such as the name of a county).
JsonConvert.DeserializeObject, on the other hand, is mainly intended to be used when you know the structure of the JSON and you want to deserialize into strongly typed classes.
Posted On:
25-Mar-2016 01:17