Skip to main content



      Home
Home » Eclipse Projects » Eclipse Yasson » Pb marshalling Optional<java.util.Date> attribute(Pb marshalling Optional<java.util.Date> attribute)
Pb marshalling Optional<java.util.Date> attribute [message #1751012] Tue, 03 January 2017 11:26 Go to next message
Eclipse UserFriend
Hi,

First off, happy new year to the Yasson team.
I've done another small test using a class with an Optional<java.util.Date> attribute. It seems that there is a marshalling error on it. When calling jsonb.toJson a JsonbException is thrown (see comment in my attached code).
In the spec, it is mentionned that implementations MUST support binding of standard Java date/time classes including java.util.Date (chapter 3.5).
Is it a bug or a bad usage from me?
Re: Pb marshalling Optional<java.util.Date> attribute [message #1751066 is a reply to message #1751012] Wed, 04 January 2017 04:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jean-Francis

You're right. Seems it's a bug Sad . I'll take a look at it and put it in issues list.

Thanks
Re: Pb marshalling Optional<java.util.Date> attribute [message #1751078 is a reply to message #1751066] Wed, 04 January 2017 05:37 Go to previous messageGo to next message
Eclipse UserFriend
Thank you. Nice to help you.
Re: Pb marshalling Optional<java.util.Date> attribute [message #1751111 is a reply to message #1751078] Wed, 04 January 2017 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Just as a workaround, if you set the visibility of the inner class (i.e. Person) to public, you'll not get this error. It's not related to the Optional field. I've to investigate more to see if still this is a bug or it's something that is not going to be supported by the API.
Re: Pb marshalling Optional<java.util.Date> attribute [message #1751383 is a reply to message #1751012] Mon, 09 January 2017 10:54 Go to previous message
Eclipse UserFriend
According to the spec [3.7.1] only public and protected nested classes are supported. As I see you have package private (default) access in your sample.
Previous Topic:Using Yasson within JavaEE (JAX-RS)
Next Topic:Null OptionalInt deseralized as null
Goto Forum:
  


Current Time: Mon Jul 14 05:31:48 EDT 2025

Powered by FUDForum. Page generated in 0.06132 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top