Share via


AgentRunResponse.TryDeserialize<T>(JsonSerializerOptions, T) Method

Definition

Tries to deserialize response text into the given type using the specified serializer options.

public bool TryDeserialize<T>(System.Text.Json.JsonSerializerOptions serializerOptions, out T? structuredOutput);
member this.TryDeserialize : System.Text.Json.JsonSerializerOptions * 'T -> bool
Public Function TryDeserialize(Of T) (serializerOptions As JsonSerializerOptions, ByRef structuredOutput As T) As Boolean

Type Parameters

T

The output type to deserialize into.

Parameters

serializerOptions
JsonSerializerOptions

The JSON serialization options to use.

structuredOutput
T

The parsed structured output.

Returns

true if parsing was successful; otherwise, false.

Applies to