Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RestSharp/Deserializers/JsonDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private IDictionary BuildDictionary(Type type, object parent)
private IList BuildList(Type type, object parent)
{
var list = (IList)Activator.CreateInstance(type);
var listType = type.GetInterfaces().First(x => x.GetGenericTypeDefinition() == typeof(IList<>));
var listType = type.GetInterfaces().First(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IList<>));
var itemType = listType.GetGenericArguments()[0];

if (parent is IList) {
Expand Down