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.
- Host: GitHub
- URL: https://github.com/t1/yasson-record-issue
- Owner: t1
- Created: 2024-10-16T06:32:09.000Z (almost 2 years ago)
- Default Branch: trunk
- Last Pushed: 2024-10-16T06:43:44.000Z (almost 2 years ago)
- Last Synced: 2025-03-12T16:35:48.384Z (over 1 year ago)
- Language: Java
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
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"}}`.