0

I am using documentation given here to connect with another service. So far the connection to another service works fine. When I get the response as a string it also works fine.

But it fails to deserialize when I try to deserialize as an object.

My pom looks like this.



  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-rest-client-reactive-jackson</artifactId>
    </dependency>

I am using the sample Class provided in the demo

public class Extension {

    public String id;
    public List<String> keywords;

}

//expected return type 
public class ExtentsionWrapper{
     
    List<Extention> extentions;

}


3
  • What exactly is not working? What are you seeing? Commented Dec 29, 2023 at 18:44
  • no error nothing just the result is not mapping to the object I posted Commented Dec 29, 2023 at 19:33
  • 1
    Try adding @RegisterForReflection(registerFullHierarchy=true) on ExtentsionWrapper Commented Jan 3, 2024 at 11:10

1 Answer 1

0

I have manged to make it work .

public class Extension {

    @JsonProperty("id")
    public String id;
    @JsonProperty("keywords")
    public List<String> keywords;

}

//expected return type 
public class ExtentsionWrapper{
    @JsonProperty("extentions")
    List<Extention> extentions;

}

adding @JsonProperty fixed my serialization issue

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.