Skip to content

fix(fetch): serialize LocalDate in post data#1934

Merged
yury-s merged 1 commit into
microsoft:mainfrom
yury-s:fix-1865
Jun 18, 2026
Merged

fix(fetch): serialize LocalDate in post data#1934
yury-s merged 1 commit into
microsoft:mainfrom
yury-s:fix-1865

Conversation

@yury-s

@yury-s yury-s commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Register a LocalDate gson adapter in jsonDataSerializer so POJOs with a LocalDate property can be sent via RequestOptions.setData.
  • Serialized as an ISO-8601 date string (yyyy-MM-dd) without converting through a time zone, avoiding calendar-date shifts.

Fixes #1865

Register a LocalDate gson adapter in jsonDataSerializer so POJOs with a
LocalDate property can be sent via RequestOptions.setData. The value is
emitted as an ISO-8601 date string (yyyy-MM-dd) without converting through
a time zone, which would otherwise risk shifting the calendar date.

Fixes: microsoft#1865
@yury-s yury-s merged commit 43d2601 into microsoft:main Jun 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot serialise LocalDate when sending API post request

2 participants