DataContractJsonSerializer.DataContractSurrogate Property

 

Gets a surrogate type that is currently active for a given IDataContractSurrogate instance. Surrogates can extend the serialization or deserialization process.

Namespace:   System.Runtime.Serialization.Json
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

member DataContractSurrogate : IDataContractSurrogate with get

Property Value

Type: System.Runtime.Serialization.IDataContractSurrogate

An implementation of the IDataContractSurrogate class.

The IDataContractSurrogate can be used to customize how instances of a type are serialized and deserialized. For example, it can be used to enable serialization of legacy types that are not serializable, that is, types to which the DataContractAttribute attribute has not been applied.

.NET Framework
Available since 3.5
Return to top
Show: