Class PostgresInfinityDateTimeConverter
✅ FIX FOR "-infinity" PROBLEM: DateTime converter for handling PostgreSQL "-infinity"
Solves problem: The JSON value could not be converted to System.DateTime
public class PostgresInfinityDateTimeConverter : JsonConverter<DateTime>
Inheritance
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type .
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Write(Utf8JsonWriter, DateTime, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)