-Fixed error serializing some non-generic collections

This commit is contained in:
James Newton-King
2013-04-12 12:14:50 +12:00
parent cb7ac1dfb4
commit f527d0bd4c
3 changed files with 65 additions and 29 deletions
@@ -143,7 +143,7 @@ namespace Newtonsoft.Json.Serialization
ParametrizedConstructor = CollectionUtils.ResolveEnumableCollectionConstructor(underlyingType, CollectionItemType);
if (underlyingType.GetGenericTypeDefinition() == typeof (IEnumerable<>))
if (underlyingType.IsGenericType() && underlyingType.GetGenericTypeDefinition() == typeof(IEnumerable<>))
{
_genericCollectionDefinitionType = tempCollectionType;