Hi, according to the specification (chapters 3.7.2 and 3.7.3) binding of nested classes, whether static or not, should work.
However, it doesn't work using Yasson 1.0.0-M2 with a nested class containing an Optional<LocalDate> attribute (see attached file).
Some precisions: declaring the nested Character class static doesn't change things, externalizing the Character class in a dedicated Java file make things work. Do I miss ST or shall I open a bug?

It's not related to optional property, because it happens even if you remove that field. I think it's the same issue as mentioned in the following thread. Its because of the access level of your inner class, which based on spec should be public or protected.

Hi Hehsan, thank you for your answer, I've done additional tests and you're right. It works if the nested class is static and explictely declared public or protected. But there is still an issue if the class is not static. The reference to the enclosing class is implictely passed as a constructor parameter.
Hence, at runtime, Yasson cannot find a default noargs constructor and generates an error: " Can't create instance of a class: class lab.jefrajames.jsonb.NestedClassTest$Character, No default constructor found".
This Java behaviour is perfectly explained in this article.
Please find attached a modified version of my test case which illustrates that. Constructors of the inner class are displayed.

Hmmm. That's a good point. I'm not sure if it could be considered as a bug. Maybe we need to update the spec or clarify the way it should be interpreted. I think Dmitry may already have an answer for this.