diff --git a/JsonSubTypes/JsonSubtypes.cs b/JsonSubTypes/JsonSubtypes.cs index e377708..330100e 100644 --- a/JsonSubTypes/JsonSubtypes.cs +++ b/JsonSubTypes/JsonSubtypes.cs @@ -380,6 +380,11 @@ private static Type GetTypeByName(string typeName, TypeInfo parentType) var searchLocation = parentTypeFullName.Substring(0, parentTypeFullName.Length - parentType.Name.Length); typeByName = insideAssembly.GetType(searchLocation + typeName, false, true); } + + if (parentTypeFullName != null && typeByName == null) + { + typeByName = Type.GetType(typeName); + } var typeByNameInfo = ToTypeInfo(typeByName); if (typeByNameInfo != null && parentType.IsAssignableFrom(typeByNameInfo))