-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jackson Annotations not taken into account #3198
Comments
Not sure if that' the actual problem but |
@romain-grecourt I added your dependency suggestion instead, but no change. Is there any documentation by Helidon/Oracle for this? From my point of view, it is not possible to change the default json library to jackson (at least for Resources). Is this correct? |
@aaron-sr It should work using the Jersey dependency. See https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/media.html#json.jackson If it still doesn't work, please provide a copy of your application log. |
The output of This dependency groups some of the most common Helidon MicroProfile components and it also configures JSON-B out of the box, it adds the following dependencies:
If you add If you are using Or you can manually exclude the 3 JSON-B related dependencies from the bundle. |
The changes required in the pom.xml would look like this: <dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse</groupId>
<artifactId>yasson</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency> |
Environment Details
Problem Description
Jackson annotations like
@JsonDeserialize
are not considered in Resources.Steps to reproduce
Use following dependency (instead of
helidon-media-jsonb
)Annotate an empty
Dto
class with a custom deserializer using@JsonDeserialize(using = DtoDeserializer.class)
.Test Implementation for DtoSerializer may look like this:
Add a method like this
If the custom deserializer is used, an exception must be thrown.
The text was updated successfully, but these errors were encountered: