Class DateTimeJsonConverter
Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types
Inherited Members
Namespace: Pulumi.Esc.Sdk.Client
Assembly: Pulumi.Esc.Sdk.dll
Syntax
public class DateTimeJsonConverter : JsonConverter<DateTime>
Properties
View SourceFormats
The formats used to deserialize the date
Declaration
public static string[] Formats { get; }
Property Value
| Type | Description |
|---|---|
| string[] |
Methods
View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Returns a DateTime from the Json object
Declaration
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | |
| Type | typeToConvert | |
| JsonSerializerOptions | options |
Returns
| Type | Description |
|---|---|
| DateTime |
Overrides
View SourceWrite(Utf8JsonWriter, DateTime, JsonSerializerOptions)
Writes the DateTime to the json writer
Declaration
public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | |
| DateTime | dateTimeValue | |
| JsonSerializerOptions | options |