'How to extract fields from an api

I have an api which returns data in the below format when i use the clientbuilder get():

final Response response = ClientBuilder.newClient().target("url").queryParam("CustomerQuery", jsonarr).request(MediaType.APPLICATION_JSON).get();
String actual = response.readEntity(String.class);
System.out.println(actual);

Result:

624d45e32b16017ecd3a088eDocument{{query=query1, place=AAA, name=BBB, Format=csv, Version=2}}
624dba0b2b16017ecd3a0896Document{{query=query2, place=AAA, name=BBB, Format=csv, Version=2}}

I need to extract value in each field for my code and i tried using:

List<Storemylist> Storemylist = ClientBuilder.newClient().target("url").request(MediaType.APPLICATION_JSON).get(new GenericType<List<Storemylist>>() {});

i declared a class Storemylist with the fields i need for the same but it gave me the below error:

javax.ws.rs.ProcessingException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('d' (code 100)): Expected space separating root-level values(..)

Please let me know if my approach is wrong or i can fix the above is some other way.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source