Skip to content

Create proper MonthDeserializer and MonthSerializer (don't rely on EnumDeserializer/EnumSerializer) #5078

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

Open
cowtowncoder opened this issue Apr 9, 2025 · 6 comments · Fixed by #5124
Labels
3.0-release-notes Issues relevant for 3.0 release notes. 3.0 Issue planned for initial 3.0 release date-time-config Work related to possible larger DateTimeConfig feature
Milestone

Comments

@cowtowncoder
Copy link
Member

Current deserializer implementation for type java.time.Month is a mess, inherited from jackson-datatype-jsr310: it defaults to using plain EnumDeserializer but wrapping it in case of 1-based processing being enabled.

Instead, we should just write regular deserializer.

@cowtowncoder cowtowncoder added date-time-config Work related to possible larger DateTimeConfig feature 3.0 Issue planned for initial 3.0 release labels Apr 9, 2025
@cowtowncoder cowtowncoder changed the title Create proper MonthDeserializer (don't rely on EnumDeserializer) Create proper MonthDeserializer and MonthSerializer (don't rely on EnumDeserializer/EnumSerializer) Apr 9, 2025
@cowtowncoder
Copy link
Member Author

@JooHyukKim this might be something for you, wrt date/time ser/deser. Basically: although java.time.Month is an Enum, it might be better not to rely on out-of-the-box Enum[De]Serializer due to 1-based nature of Month values.

@JooHyukKim
Copy link
Member

JooHyukKim commented Apr 26, 2025

Thanksss, I will look into this!
WIP on serializer

@JooHyukKim
Copy link
Member

@cowtowncoder Since there is behavior change, can we add 3.0-release-notes label here?

cowtowncoder pushed a commit that referenced this issue Apr 28, 2025
@cowtowncoder cowtowncoder added this to the 3.0.0-rc4 milestone Apr 28, 2025
@cowtowncoder cowtowncoder added the 3.0-release-notes Issues relevant for 3.0 release notes. label Apr 28, 2025
@cowtowncoder
Copy link
Member Author

cowtowncoder commented Apr 28, 2025

@cowtowncoder Since there is behavior change, can we add 3.0-release-notes label here?

Sure, added. Feel free to add labels as necessary (you have access, right? If not I can see how to give access)

EDIT: requires "Triage" access.

@JooHyukKim
Copy link
Member

JooHyukKim commented Apr 28, 2025

If not I can see how to give access)

Yeah it would help 👌🏼 for label access

@cowtowncoder
Copy link
Member Author

@JooHyukKim created new team ("core contributors") with Triage access so you and @pjfanning should now be able to add/remove labels on jackson-databind issues. Also LMK where else needed (will add to modules-java8 next)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0-release-notes Issues relevant for 3.0 release notes. 3.0 Issue planned for initial 3.0 release date-time-config Work related to possible larger DateTimeConfig feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants