From 3384b65fb58d3e7d7575214819eea2d93d7c37e8 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Tue, 12 Feb 2013 11:21:54 -0800 Subject: [PATCH] -patch use of JsonContract.OnXXXX to use OnXXXXMethods --- .../Serialization/JsonSerializerInternalReader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs index a91f60fc..307b5b2e 100644 --- a/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs +++ b/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs @@ -561,10 +561,10 @@ To fix this error either change the JSON to a {1} or change the deserialized typ if (id != null && isTemporaryListReference) throw JsonSerializationException.Create(reader, "Cannot preserve reference to array or readonly list: {0}.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType)); - if (contract.OnSerializing != null && isTemporaryListReference) + if (contract.OnSerializingMethods != null && isTemporaryListReference) throw JsonSerializationException.Create(reader, "Cannot call OnSerializing on an array or readonly list: {0}.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType)); - if (contract.OnError != null && isTemporaryListReference) + if (contract.OnErrorMethods != null && isTemporaryListReference) throw JsonSerializationException.Create(reader, "Cannot call OnError on an array or readonly list: {0}.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType)); if (!arrayContract.IsMultidimensionalArray)