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

Support for more codecs (Duration, java.time.LocalDate, etc ...) #275

Open
ramytanios opened this issue Mar 13, 2024 · 1 comment
Open
Labels
feature New feature or request good first issue Good for newcomers

Comments

@ramytanios
Copy link

ramytanios commented Mar 13, 2024

Hi

Would be cool to have codecs for objects such as scala.concurrent.Duration, java.time.LocalDate, java.time.Instant.
For the Duration, I would get inspired by pureconfig: https://github.com/pureconfig/pureconfig/blob/7d15967d12b3bee0fc7bbd13325ebb787a8a3a31/core/src/main/scala/pureconfig/DurationUtils.scala

Thanks

@lbialy lbialy added feature New feature or request good first issue Good for newcomers labels May 10, 2024
@lbialy
Copy link
Contributor

lbialy commented Jul 20, 2024

Problem with this is that we'd like to avoid having biased instances as these types usually do not have a canonical string representation and providing a biased one would lead to rather troublesome conflict scenarios where users need to override our instances to fit their specific encoding.

If one were to actually implement these instances they would need to go into a lower priority trait that companion object would extend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants