-
Notifications
You must be signed in to change notification settings - Fork 84
Cannot serialize org.joda.time.Days
#160
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
Comments
There is some confusion here: what you are trying to do is Serialize (write as json) not Deserialize. I will fix the title. But aside from that, yes, does look like some handling may be missing. |
cc @JooHyukKim -- date/time issue if you are interested :) |
org.joda.time.Days
@cowtowncoder Sorry, I just checked your reply. I found that some other classes similar to Days, such as Hours and Years, also don't work. Do I need to write a serialization and deserialization class for each of them separately? this is my code:
and this is my exception:
|
@bestbugwriter Could you open another issue regarding those? |
ok #162 |
@bestbugwriter Like @JooHyukKim said, we do need issues to add support for types with missing support. Looks like you already did that, thanks! |
Uh oh!
There was an error while loading. Please reload this page.
I found jackson-datatype-joda is also has a serializer
com.fasterxml.jackson.datatype.joda.deser.PeriodDeserializer
,andDays
does implements theReadablePeriod
interface.but I don't known why it is not work.
https://stackoverflow.com/questions/79535991/joda-date-time-type-org-joda-time-days-not-supported-by-default?noredirect=1#comment140269178_79535991
I used joda 2.10.14 time and jackson 2.18.3,
I have register
JodaModule
, but it also throw Exception, my code isthe exception
I checked JodaModule code, found that it is not add Days deserializer, but has PeriodDeserializer. So, how should I resolve this issue?
The text was updated successfully, but these errors were encountered: