Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the serializers using the DateTimeFormat API #415

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dkhalanskyjb
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb commented Jul 23, 2024

  • Default serializers are separated from the ISO serializers, which now mirror the behavior of Formats.ISO instead of toString/parse.
  • New API: custom serializers parameterized with a DateTimeFormat.
  • Serial names are properly distinct for incompatible formats.

Fixes #350
Fixes #351
Fixes #416

The names of the serializers are still under discussion, but
it's already decided that the serializers are going to be abstract
classes.

Fixes #350
Sometimes, `X.Formats.ISO` and `X.parse()`/`X.toString()` behave
subtly differently; currently, it's the case for `LocalDateTime`
and `LocalTime`.

With this change, every entity that supports custom formats obtains
a separate default serializer in addition to the
ISO 8601 serializer, which now properly delegates to the
corresponding `DateTimeFormat`.

Fixes #351
@dkhalanskyjb dkhalanskyjb changed the title Provide custom serializers based on DateTimeFormat Rework the serializers using the DateTimeFormat API Jul 25, 2024
@dkhalanskyjb dkhalanskyjb marked this pull request as ready for review July 25, 2024 13:45
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g July 25, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant