-
I'm using Quarkus REST client to call an external service. which responds with a JSON payload: {
"status", "NOT_FOUND",
"statusCode", 404
} I need to deserialize this into a Java class: import javax.ws.rs.core.Response;
...
@RegisterForReflection
public final class MyRestPayload {
private Response.Status status;
private int statusCode;
public RestPayload() {}
// plain getters and setters for status and statuscode
} In non-native mode the following code, which transforms the jaxrs payload to my entity works fine: public Exception toThrowable(final Response response) {
if (response.getStatus() == HttpStatus.SC_NOT_FOUND) {
final MyRestPayload entity = response.readEntity(MyRestPayload.class);
...
}
}
} But in native mode this fails because jackson seems to have lost its "smarts" about deserializing a string value to the
Any ideas how to fix this? I'm running Quarkus 2.6.2.Final |
Beta Was this translation helpful? Give feedback.
Answered by
wabrit
May 26, 2022
Replies: 1 comment 1 reply
-
OK ignore me - it turned out to have nothing to do with native code. Sorry! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wabrit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK ignore me - it turned out to have nothing to do with native code. Sorry!