Utf8jsonreader Datetimeoffset Parsing Rfc 3339 Site

If you need UTC normalization:

using System; using System.Text.Json; using System.Text.Json.Serialization; // for JsonException public static DateTimeOffset ParseDateTimeOffsetFromReader(ref Utf8JsonReader reader) utf8jsonreader datetimeoffset parsing rfc 3339

throw new JsonException($"Invalid RFC 3339 DateTimeOffset format: dateString"); If you need UTC normalization: using System; using System

public static DateTimeOffset ParseRfc3339FromSpan(ref Utf8JsonReader reader) utf8jsonreader datetimeoffset parsing rfc 3339