-Added compact framework support
-Refactored JavaScriptConvert to not rely on DateTimeOffset when converting dates -Refactored JsonSerializer to use new CreateInstance on ReflectionUtils -Deleted JsonHandler
This commit is contained in:
@@ -523,7 +523,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
if (listType.IsArray)
|
||||
list = ToArray(((List<object>)list).ToArray(), ReflectionUtils.GetCollectionItemType(listType));
|
||||
else if (ReflectionUtils.InheritsGenericClassDefinition(listType, typeof(ReadOnlyCollection<>)))
|
||||
list = (IList)Activator.CreateInstance(listType, list);
|
||||
list = (IList)ReflectionUtils.CreateInstance(listType, list);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user