Class JsonShortDateTimeConverter
JSON converter for short DateTime values
Inherited Members
Namespace: DuetAPI.Utility
Assembly: DuetAPI.dll
Syntax
public class JsonShortDateTimeConverter : JsonConverter<DateTime>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read a short DateTime from JSON
Declaration
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | JSON reader |
Type | typeToConvert | Target type |
JsonSerializerOptions | options | Serializer options |
Returns
Type | Description |
---|---|
DateTime | Deserialized DateTime or null |
Overrides
Write(Utf8JsonWriter, DateTime, JsonSerializerOptions)
Write a short DateTime to JSON
Declaration
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | JSON writer |
DateTime | value | Value to write |
JsonSerializerOptions | options | Serializer options |