-Fixed deserializing with constructor and readonly collection property

This commit is contained in:
James Newton-King
2017-10-22 13:03:33 +13:00
parent 12f886ab99
commit 4a74cf1b1a
2 changed files with 34 additions and 1 deletions
@@ -2006,7 +2006,7 @@ namespace Newtonsoft.Json.Serialization
{
JsonArrayContract propertyArrayContract = (JsonArrayContract)propertyContract;
if (propertyArrayContract.CanDeserialize)
if (propertyArrayContract.CanDeserialize && !propertyArrayContract.IsReadOnlyOrFixedSize)
{
object createdObjectCollection = property.ValueProvider.GetValue(createdObject);
if (createdObjectCollection != null)