diff --git a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs index d5e840f3..7192965b 100644 --- a/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs +++ b/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs @@ -143,6 +143,14 @@ namespace Newtonsoft.Json.Serialization public bool IgnoreSerializableAttribute { get; set; } #endif + /// + /// Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing tyeps. + /// + /// + /// true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false. + /// + public bool IgnoreIsSpecifiedMembers { get; set; } + /// /// Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized. /// @@ -1399,7 +1407,10 @@ namespace Newtonsoft.Json.Serialization } property.ShouldSerialize = CreateShouldSerializeTest(member); - SetIsSpecifiedActions(property, member, allowNonPublicAccess); + if (!IgnoreIsSpecifiedMembers) + { + SetIsSpecifiedActions(property, member, allowNonPublicAccess); + } return property; }