Converts the given object to the specified type.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
obj (or a nested member of obj) contains a "__type" property that indicates a custom type, but the type resolver that is associated with the serializer cannot find a corresponding managed type.
obj (or a nested member of obj) contains a "__type" property that indicates a custom type, but the result of deserializing the corresponding JSON string cannot be assigned to the expected target type.
obj (or a nested member of obj) contains a "__type" property that indicates either Object or a non-instantiable type (for example, an abstract type or an interface).
An attempt was made to convert obj to an array-like managed type, which is not supported for use as a deserialization target.
It is not possible to convert obj to T.
obj is a dictionary type and a non-string key value was encountered.
obj includes member definitions that are not available on type T.
The ConvertToType method tries to convert the object instance that is represented by obj to an instance of type T. During this conversion there is no guarantee that object reference equality is maintained. Therefore, you cannot assume that obj and T refer to the same object.