-Added support for falling back to IEnumerable<T> constructor on lists

-Added support for falling back to IEnumerable<KeyValuePair<TKey, TValue>> constructor on dictionaries
This commit is contained in:
James Newton-King
2013-03-30 13:57:13 +13:00
parent 57d9cb898d
commit 2bf88ebba0
6 changed files with 207 additions and 94 deletions
@@ -243,7 +243,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}";
ExceptionAssert.Throws<JsonSerializationException>(
@"Cannot preserve reference to array or readonly list: System.String[][]. Path '$values', line 3, position 15.",
@"Cannot preserve reference to array or readonly list, or list created from a non-default constructor: System.String[][]. Path '$values', line 3, position 15.",
() =>
{
JsonConvert.DeserializeObject<string[][]>(json,