DurationJsonConverter Class

JSON converter for Duration.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class DurationJsonConverter : JsonConverter<Duration>
Inheritance
Object    JsonConverter    JsonConverterDuration    DurationJsonConverter

Constructors

DurationJsonConverterInitializes a new instance of the DurationJsonConverter class

Properties

HandleNullIndicates whether should be passed to the converter on serialization, and whether Null should be passed on deserialization.
(Inherited from JsonConverterDuration)
TypeGets the type being converted by the current converter instance.
(Inherited from JsonConverterDuration)

Methods

CanConvertDetermines whether the specified type can be converted.
(Inherited from JsonConverterDuration)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ReadReads and converts the JSON to type T.
(Overrides JsonConverterTRead(Utf8JsonReader, Type, JsonSerializerOptions))
ReadAsPropertyNameReads a dictionary key from a JSON property name.
(Inherited from JsonConverterDuration)
ToStringReturns a string that represents the current object.
(Inherited from Object)
WriteWrites a specified value as JSON.
(Overrides JsonConverterTWrite(Utf8JsonWriter, T, JsonSerializerOptions))
WriteAsPropertyNameWrites a dictionary key as a JSON property name.
(Inherited from JsonConverterDuration)

See Also