Utf8jsonreader Datetimeoffset Parsing Rfc 3339 Exclusive Jun 2026

else

| Error | Cause | |------------------------------------|-----------------------------------------------------------------------| | JsonException: Expected string | Token is not a string (maybe null or number). | | FormatException on TryParse | Missing T , wrong offset format ( +0530 instead of +05:30 ), wrong fractional seconds. | | Z not recognized | Some old parsers need ToUniversalTime() – not with DateTimeOffset . | utf8jsonreader datetimeoffset parsing rfc 3339

When parsing JSON data with Utf8JsonReader , .NET applications often encounter DateTimeOffset values represented as strings in RFC 3339 format. While .NET provides mechanisms for parsing DateTimeOffset , enhancing the support within Utf8JsonReader can streamline the process, making it more efficient and less error-prone. | When parsing JSON data with Utf8JsonReader ,

: RFC 3339 allows a space to separate the date and time, but Utf8JsonReader strictly requires the "T" separator . utf8jsonreader datetimeoffset parsing rfc 3339