JsonMediaTypeFormatter.SetSerializer Method (Type, DataContractJsonSerializer)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Registers the DataContractJsonSerializer to use to read or write the specified type.

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)


Public Sub SetSerializer ( _
    type As Type, _
    serializer As DataContractJsonSerializer _
public void SetSerializer(
    Type type,
    DataContractJsonSerializer serializer
void SetSerializer(
    Type^ type, 
    DataContractJsonSerializer^ serializer
member SetSerializer : 
        type:Type * 
        serializer:DataContractJsonSerializer -> unit 
public function SetSerializer(
    type : Type, 
    serializer : DataContractJsonSerializer


  • type
    Type: System.Type
    The type of object that will be serialized or deserialized with the serializer.

.NET Framework Security

See Also


JsonMediaTypeFormatter Class

SetSerializer Overload

System.Net.Http.Formatting Namespace