eclipse-ee4j / yasson

Eclipse Yasson project

Home Page:https://projects.eclipse.org/projects/ee4j.yasson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serialization of generic root type with custom serializer not working

bpasson opened this issue · comments

Describe the bug
When using a custom serializer for a generic root type yasson does not use it when you specify the generic type in stead of the raw type.

To Reproduce
I created a small reproducer project which demonstrates the issue.

  1. git clone https://github.com/bpasson/eclipse-yasson-issue-639
  2. cd eclipse-yasson-issue-639
  3. ./mvnw clean verify

See the failing test cases.

Expected behavior
At least the TypedRecordSerializerParameterized from the reproducer project should be used to serialize the TypedRecord instances. Both TypedRecordSerializerParameterized and TypedRecordSerializerRaw working might be fine too, but I cannot see if that causes difficulties elsewhere.

System information:

  • OS: Mac
  • Java Version: 21
  • Yasson Version: 3.0.3