I just got a hold of JSON.NET and its been great so far.
However, I cannot figure out how to determine the type of a serialized object when deserializing it.
How can I determine the object's class to cast it?
To clarify my question, let's say I wanted to do this
string json = <<some json i don't know>> var data = JsonConvert.DeserializeObject(json); if (data is Person) { //do something } else if (data is Order) { //do something else } Does Json.NET support this kind of functionality?
Newtonsoft.Json.Linq.JObject