Condividi tramite


IotHubClientOptions.PayloadConvention Property

Definition

The payload convention to be used to serialize and encode the payload being sent to service.

public Microsoft.Azure.Devices.Client.PayloadConvention PayloadConvention { get; set; }
member this.PayloadConvention : Microsoft.Azure.Devices.Client.PayloadConvention with get, set
Public Property PayloadConvention As PayloadConvention

Property Value

Remarks

The PayloadConvention defines both the serializer and encoding to be used. You will only need to set this if you have objects that have special serialization rules or require a specific byte encoding.

The default value is set to DefaultPayloadConvention which uses the NewtonsoftJsonPayloadSerializer serializer and Utf8PayloadEncoder encoder.

Applies to