-Added support for serializing const fields
-Fixed tests
This commit is contained in:
@@ -814,12 +814,8 @@ namespace Newtonsoft.Json.Serialization
|
||||
}
|
||||
else
|
||||
{
|
||||
// can't populate something like an IEnumerable
|
||||
if (!arrayContract.CanDeserialize)
|
||||
{
|
||||
reader.Skip();
|
||||
return existingValue;
|
||||
}
|
||||
throw JsonSerializationException.Create(reader, "Cannot populate list type {0}.".FormatWith(CultureInfo.InvariantCulture, contract.CreatedType));
|
||||
|
||||
value = PopulateList((arrayContract.ShouldCreateWrapper) ? arrayContract.CreateWrapper(existingValue) : (IList)existingValue, reader, arrayContract, member, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user