我正在尝试通过“ response.readEntity(JsonArray.class);”获得输入我遇到错误的地方-“ com.fasterxml.jackson.databind.JsonMappingException:找不到非具体Collection类型的反序列化器”。
import javax.json.JsonArray;
HostnameVerifier hostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier();
SSLContext ctx = SSLContext.getInstance("SSL");
ctx.init(null, certs, new SecureRandom());
client = ClientBuilder.newBuilder().withConfig(new ClientConfig())
.hostnameVerifier(hostnameVerifier).sslContext(ctx).build();
static WebTarget target;
Response response = getResponsebyURI(uri);
target = client.target(URI);
Response res = target.request(MediaType.APPLICATION_JSON).header("key", value).get();
JsonArray j = null;
j = response.readEntity(JsonArray.class);
请帮助我解决异常并阅读输入内容。