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

I don't deserialize java 8 date/time type java.time.Instant #302

Open
benjessie25 opened this issue Feb 14, 2024 · 2 comments
Open

I don't deserialize java 8 date/time type java.time.Instant #302

benjessie25 opened this issue Feb 14, 2024 · 2 comments

Comments

@benjessie25
Copy link

No description provided.

@benjessie25 benjessie25 changed the title I don't deserialize ava 8 date/time type java.time.Instant I don't deserialize java 8 date/time type java.time.Instant Feb 14, 2024
@benjessie25
Copy link
Author

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type java.time.Instant not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling

@cowtowncoder
Copy link
Member

cowtowncoder commented Feb 14, 2024

Yes, if you have that type somewhere in your class definitions, you need to either add the module, or add something else to handle it (custom (de)serializer), or mark as "ignored type".
Something like:

        mapper.configOverride(Instant.class).setIsIgnoredType(true);

which would then ignore all properties with declared type of Instant.

I hope this helps!

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

No branches or pull requests

2 participants