Proba naprawienia

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2021-01-08 16:17:24 +01:00
parent 149796c42a
commit a25843ebfd
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -3,6 +3,7 @@ package com.plannaplan.services;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
@ -62,6 +63,7 @@ public class UsosApiService {
final ObjectMapper mapper = new ObjectMapper(); final ObjectMapper mapper = new ObjectMapper();
Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() { Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() {
}); });
System.out.println(map.size());
System.out.println("FIELD"); System.out.println("FIELD");
apiResponse.setName(map.get(NAME_FIELD)); apiResponse.setName(map.get(NAME_FIELD));
System.out.println(map.get(NAME_FIELD)); System.out.println(map.get(NAME_FIELD));