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

Serializers for java.time.* #1806

Closed
rrva opened this issue Dec 25, 2021 · 1 comment
Closed

Serializers for java.time.* #1806

rrva opened this issue Dec 25, 2021 · 1 comment
Labels
feature Static modules Request for serializer that can be added to Java module

Comments

@rrva
Copy link

rrva commented Dec 25, 2021

What is your use-case and why do you need this feature?

We use a lot of java.time.OffsetDateTime which it is a bit cumbersome to have to annotate separately with a custom serializer like @Serializable(KOffsetDateTimeSerializer::class).

Describe the solution you'd like

It would be useful to have a special org.jetbrains.kotlinx:kotlinx-serialization-jvmtime dependency which automatically adds serializers to handle some very common classes from the java8 java.time module.

@rrva rrva added the feature label Dec 25, 2021
@sandwwraith
Copy link
Member

Currently, it is possible only with @file:UseSerializers annotation. For module-wide options / auto-including from dependency, there is a separate issue: #507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Static modules Request for serializer that can be added to Java module
Projects
None yet
Development

No branches or pull requests

2 participants