Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0f2ad9d

Browse files
author
Wim Pool
committed
Make ICollection behave the same as IEnumerable
1 parent 00c6f4b commit 0f2ad9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.Text/Common/JsReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private ParseStringDelegate GetCoreParseFn<T>()
8585
}
8686
#endif
8787

88-
var isDictionary = typeof(T) != typeof(IEnumerable)
88+
var isDictionary = typeof(T) != typeof(IEnumerable) && typeof(T) != typeof(ICollection)
8989
&& (typeof(T).AssignableFrom(typeof(IDictionary)) || typeof(T).HasInterface(typeof(IDictionary)));
9090
if (isDictionary)
9191
{
@@ -124,4 +124,4 @@ private ParseStringDelegate GetCoreParseFn<T>()
124124
}
125125

126126
}
127-
}
127+
}

0 commit comments

Comments
 (0)