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

Initial Commit for Java.util.Date Extension Support + LocalDateTime Unit Test #124

Open
wants to merge 7 commits into
base: 2.17
Choose a base branch
from

Conversation

Shounaks
Copy link
Contributor

@Shounaks Shounaks commented Feb 25, 2024

Issue: #48
Providing Support for java.util.Date, via Extensions.

@Shounaks Shounaks marked this pull request as ready for review February 25, 2024 08:41

public class DateValueReader extends ValueReader {
protected DateValueReader() {
super(Date.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is not JAva 8 date/time type... so probably should be in core jr-objects?

But also, it needs to support deserialization from Integer numbers (timestamp).

@cowtowncoder
Copy link
Member

cowtowncoder commented Mar 11, 2024

Ok, I think this could use refactoring:

  1. Not sure if java.util.Date handling should be added here: core jr-objects supports it with timestamp; should not simply overwrite it without configurability
  2. No need to add new extension, just extend JacksonJrJavaTimeExtension
  3. No need to add new ReaderWriterProvider, just extend JavaTimeReaderWriterProvider

EDIT: ignore this, see my next note.

@cowtowncoder
Copy link
Member

Oh shoot. I should have read it more carefully: this ONLY adds textual read/write for java.util.Date. I was hoping more support for Java 8 date/time types.

I think addition of more features would be ok but should be part of same extension (not separate one) and require configuration (by default leaving serialization as timestamp) -- it's ok to accept textual value by default tho.
However, there is then the question of how to specify format used, and how to (re)configure.

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.

2 participants