JsonBlockToObjectT Method

Deserializes the JSON data of the current instance into an object of type T.

Definition

Namespace: GenerativeAI.Core
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public T ToObject<T>()
where T : class

Type Parameters

T
The target type to which the JSON data will be deserialized. Must be a class.

Return Value

T
An instance of type T if deserialization is successful, or null if an error occurs.

See Also