DataContractJsonSerializer.IgnoreExtensionDataObject 属性
定义
获取一个值,指定在反序列化时是否忽略未知数据以及在序列化时是否忽略 IExtensibleDataObject 接口。Gets a value that specifies whether unknown data is ignored on deserialization and whether the IExtensibleDataObject interface is ignored on serialization.
public:
property bool IgnoreExtensionDataObject { bool get(); };
public bool IgnoreExtensionDataObject { get; }
member this.IgnoreExtensionDataObject : bool
Public ReadOnly Property IgnoreExtensionDataObject As Boolean
属性值
若要忽略未知数据和 true,则为 IExtensibleDataObject;否则为 false。true to ignore unknown data and IExtensibleDataObject; otherwise, false.
注解
IgnoreExtensionDataObject 属性 (Property) 影响应用了 DataContractAttribute 属性 (Attribute) 的类型,并且还实现了 IExtensibleDataObject 接口。The IgnoreExtensionDataObject property affects types to which a DataContractAttribute attribute has been applied and that also implement the IExtensibleDataObject interface. 在这种情况下,如果 IExtensibleDataObject 为 true,在读取和写入时将忽略在协定的将来版本中添加的数据。In this case when IExtensibleDataObject is true, data added in future versions of the contract is ignored on read and write. 有关详细信息,请参阅向前兼容的数据协定。For more information, see Forward-Compatible Data Contracts.