Skip to content

Helidon WebClient typed collections serialization/deserialization examples #8530

Closed Answered by ljnelson
RassulYunussov asked this question in Q&A
Discussion options

You must be logged in to vote

(Disclaimer: I confess that the fluent style of APIs is never obvious to me; I'm an old-school javadoc-first person.)

Working backwards, you want a GenericType, I think. Its documentation is very difficult to understand, but I think you create one like this (note the anonymous subclass nature of it):

new GenericType<List<Product>>() {};

So, untested, but does:

webClient.get()
    .path("/product")
    .request()
    .entity()
    .as(new GenericType<List<Product>>() {});

…get you pointed in the right direction? Or am I way off?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RassulYunussov
Comment options

Answer selected by RassulYunussov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants