Describe the bug
When a class implements a generic interface whose accessor method (let's say value()) carries @JsonValue
but the concrete class itself has no Jackson annotations of its own, the reflection-free Jackson serializer generator does not detect the inherited @JsonValue and instead serializes the object as a plain bean with a value property, i.e. {"value": "ENABLED"} instead of "ENABLED".
We came across this as we use Immutables to generate classes for us, which have the @JsonValue on the superinterface but not the implementation.
Just using Jackson (new ObjectMapper().writeValueAsString(...)) serializes the exact same object correctly,
It happens on quarkus.platform.version 3.37.0 and later, but not on 3.36.3 or earlier. Using quarkus.rest.jackson.optimization.enable-reflection-free-serializers=false allows the code to run correctly on 3.37+
Expected behavior
When calling the resource:
GET /wrapper/plain
200 OK
"ENABLED"
Actual behavior
When calling the resource:
GET /wrapper/plain
200 OK
{"value":"ENABLED"}
i.e. the additional {"value": is unexpected)
How to Reproduce?
reproducer.zip
Output of uname -a or ver
Linux waterhouse 7.1.3-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jul 4 19:20:12 UTC 2026 x86_64 GNU/Linux
Output of java -version
openjdk version "21.0.8" 2025-07-15 LTS (also Java 25)
Quarkus version or git rev
3.37.2 (also 3.37.0, 3.37.1)
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response
Describe the bug
When a class implements a generic interface whose accessor method (let's say
value()) carries@JsonValuebut the concrete class itself has no Jackson annotations of its own, the reflection-free Jackson serializer generator does not detect the inherited
@JsonValueand instead serializes the object as a plain bean with avalueproperty, i.e.{"value": "ENABLED"}instead of"ENABLED".We came across this as we use Immutables to generate classes for us, which have the
@JsonValueon the superinterface but not the implementation.Just using Jackson (
new ObjectMapper().writeValueAsString(...)) serializes the exact same object correctly,It happens on
quarkus.platform.version3.37.0 and later, but not on 3.36.3 or earlier. Usingquarkus.rest.jackson.optimization.enable-reflection-free-serializers=falseallows the code to run correctly on3.37+Expected behavior
When calling the resource:
Actual behavior
When calling the resource:
i.e. the additional
{"value":is unexpected)How to Reproduce?
reproducer.zip
Output of
uname -aorverLinux waterhouse 7.1.3-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jul 4 19:20:12 UTC 2026 x86_64 GNU/Linux
Output of
java -versionopenjdk version "21.0.8" 2025-07-15 LTS (also Java 25)
Quarkus version or git rev
3.37.2 (also 3.37.0, 3.37.1)
Build tool (ie. output of
mvnw --versionorgradlew --version)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response