-Fixed build

This commit is contained in:
James Newton-King
2014-04-26 23:06:30 +12:00
parent b40d705644
commit 11c2ad5c1c
15 changed files with 112 additions and 18 deletions
@@ -411,7 +411,7 @@ namespace Newtonsoft.Json.Serialization
JsonObjectContract objectContract = (JsonObjectContract)contract;
object targetObject;
// check that if type name handling is being used that the existing value is compatible with the specified type
if (existingValue != null && (resolvedObjectType == objectType || resolvedObjectType.IsInstanceOfType(existingValue)))
if (existingValue != null && (resolvedObjectType == objectType || resolvedObjectType.IsAssignableFrom(existingValue.GetType())))
targetObject = existingValue;
else
targetObject = CreateNewObject(reader, objectContract, member, containerMember, id, out createdFromNonDefaultConstructor);