An open API service indexing awesome lists of open source software.

https://github.com/t1/yasson-record-issue

Minimalistic reproducer for an issue in Yasson with a JSONB type adapter for a Java record.
https://github.com/t1/yasson-record-issue

Last synced: 7 months ago
JSON representation

Minimalistic reproducer for an issue in Yasson with a JSONB type adapter for a Java record.

Awesome Lists containing this project

README

          

= Reproducer for an Issue with Yasson and Records

This project is a minimalistic reproducer for an https://github.com/eclipse-ee4j/yasson/issues/607[issue with Yasson and Records].

The project builds just fine if you run as it is.
However, if you change the `@Order(1)` annotation in line 26 of the `JsonBindingTest` class to `@Order(3)`, then both tests fail!

It looks like Yasson doesn't pick up the JSONB adapter on the record class anymore, if it first sees the record in a generic type.
So instead of `"42"` / `{"element":"42"}`, it produces `{"value":"42"}` / `{"element":{"value":"42"}}`.