Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataContractJsonSerializer.DataContractSurrogate Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

public IDataContractSurrogate DataContractSurrogate { 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: