I have a problem during the deserialization of a json array using Spring. I have this json response from a service:
[
{
\"symbol\": \"XRPETH\",
Regarding your updated answer to your question, using bodyToFlux
is unnecessarily inefficient and semantically doesn't make much sense either as you don't really want a stream of orders. What you want is simply to be able to parse the response as a list.
bodyToMono(List
won't work due to type erasure. You need to be able to retain the type at runtime, and Spring provides ParameterizedTypeReference
for that:
bodyToMono(new ParameterizedTypeReference>() {})