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)

Syntax

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

Parameters

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

.NET Framework Security

See Also

Reference

JsonMediaTypeFormatter Class

SetSerializer Overload

System.Net.Http.Formatting Namespace