Utf8jsonreader Datetimeoffset | Parsing Rfc 3339 ((top))

public static DateTimeOffset ParseRfc3339Strict(ref Utf8JsonReader reader)

DateTimeOffset.TryParse is forgiving. For strict RFC 3339 compliance, use DateTimeOffset.TryParseExact : utf8jsonreader datetimeoffset parsing rfc 3339

public static DateTimeOffset GetDateTimeOffsetRfc3339(ref this Utf8JsonReader reader) if (reader.TokenType != JsonTokenType.String) throw new JsonException($"Expected string, got reader.TokenType"); // Fast path: use built-in conversion if possible (avoids custom parse) if (reader.TryGetDateTimeOffset(out DateTimeOffset dto)) return dto; utf8jsonreader datetimeoffset parsing rfc 3339