Java 8, java.time.LocalDate

97 views
Skip to first unread message

Tiago Carção

unread,
Feb 25, 2015, 11:30:03 AM2/25/15
to gen...@googlegroups.com
Hi, I was trying the serialization of a LocalDate object but the output isn't the intended one. How can I customize it? I tried useDateAsTimestamp and useDateFormat but with no success. I'm not referring to JodaTime but to Java 8, java.time.* package.

Thanks in advance.
Best regards

Tiago Carção

unread,
Feb 25, 2015, 11:39:07 AM2/25/15
to gen...@googlegroups.com
Found a "fix" using a custom serializer and deserializer but it should come as a default option right?

Thanks

Eugen Cepoi

unread,
Feb 25, 2015, 1:28:31 PM2/25/15
to gen...@googlegroups.com
Oh DateTime from java 8...at the moment there are no Converters for those types, even if I plan to add support for them via a new Bundle.
But if you implement some Converters for java 8 datetime api, then a PR is welcome! :) Otherwise I will do it in the upcoming months.

Eugen

--
You received this message because you are subscribed to the Google Groups "Genson user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genson+un...@googlegroups.com.
To post to this group, send email to gen...@googlegroups.com.
Visit this group at http://groups.google.com/group/genson.
To view this discussion on the web visit https://groups.google.com/d/msgid/genson/fc09e188-e6f9-4015-8d18-3289f39da5a7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Eugen Cepoi

unread,
Feb 25, 2015, 1:38:26 PM2/25/15
to gen...@googlegroups.com
Here is the associated issue I created some time ago https://github.com/owlike/genson/issues/33
As the api is available through a jar, it can not be done directly in the main genson project as it would force every user to upgrade to java 8.
The idea is to create another project (like genson-scala), containing Bundles and features for Java 8.
Reply all
Reply to author
Forward
0 new messages