Azure / Azure/typespec-rust

Cannot deserialize Option<OffsetDateTime> for XML

Open
#685 1 comment 0 reactions 1 assignee Claimed by @heaths View on GitHub
Azure.Core Client
Dominant language
Rust
Stars
7
Forks
11
Avg merge
2d 5h
Merged PRs (30d)
5

Description

The problem is that `azure_core::time::rfc3339::option` is designed for JSON deserialization where datetime values are simple strings. In XML, element content needs special handling. The XML deserializer sees `2025-11-05T21:14:02.3927308Z as a map with a text node, not as a simple string.

*The timestamp fails to deserialize because:*

1. The XML deserializer represents `2025-11-05T21:14:02.3927308Z` as a map structure (with text content)
2. The `azure_core::time::rfc3339::option` deserializer expects a simple string value
3. There's a mismatch between XML's structural representation and what the RFC3339 deserializer expects

I expect this may be a problem with `quick-xml` and will debug the issue. Hopefully I can get a PR merged wherever the issue is to fix this upstream.

_Originally posted by @heaths in https://github.com/Azure/typespec-rust/pull/682#discussion_r2500509136_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.