ConnectorTriggerPayload.Read<TPayload>(String) Method

Definition

Reads a metadata trigger callback (for example OneDrive OnNewFilesV2) into its typed payload. The expected wire shape is {"body":{"value":[{...item...}]}}.

public static TPayload? Read<TPayload>(string json) where TPayload : class;
static member Read : string -> 'Payload (requires 'Payload : null)
Public Shared Function Read(Of TPayload As Class) (json As String) As TPayload

Type Parameters

TPayload

The connector-specific payload type, a subclass of TriggerCallbackPayload<T> (for example OneDriveForBusinessOnNewFilesTriggerPayload).

Parameters

json
String

The raw JSON callback body.

Returns

TPayload

The deserialized payload, or null when json is JSON null.

Exceptions

json is null.

The body was a base64 string (a binary-content trigger such as OnNewFileV2) rather than a metadata object; read it with TryReadBinaryContent(String, Byte[]) instead.

Applies to