Cascade
Loading...
Searching...
No Matches
Buzzware.Cascade.DateTimeJsonConverter Class Reference

Default Json converter for DateTime and DateTime? typed properties. More...

Inheritance diagram for Buzzware.Cascade.DateTimeJsonConverter:

Public Member Functions

override? DateTime Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
override void Write (Utf8JsonWriter writer, DateTime? value, JsonSerializerOptions options)
 Always write the date and time with Z (UTC) timezone Milliseconds are only written if they are not 0.

Detailed Description

Default Json converter for DateTime and DateTime? typed properties.

Member Function Documentation

◆ Read()

override? DateTime Buzzware.Cascade.DateTimeJsonConverter.Read ( ref Utf8JsonReader reader,
Type typeToConvert,
JsonSerializerOptions options )
inline
  1. If the timezone is specified, decode the date and time using it
  2. When no timezone is specified, assume the local timezone
  3. Always return a DateTime with kind == Local so will be converted to the local time

The documentation for this class was generated from the following file:
  • Buzzware.Cascade/utilities/DateTimeConverter.cs