Proba naprawienia]
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
2320d66a35
commit
df90a57715
@ -61,19 +61,23 @@ public class UsosApiService {
|
|||||||
final String json = response.getBody();
|
final String json = response.getBody();
|
||||||
System.out.println(json == null);
|
System.out.println(json == null);
|
||||||
System.out.println(json == "null");
|
System.out.println(json == "null");
|
||||||
|
System.out.println(json.equals("null"));
|
||||||
|
//System.out.println(json.equals(null));
|
||||||
|
System.out.println(json);
|
||||||
if (json != "null" && json != null){
|
if (json != "null" && json != null){
|
||||||
System.out.println(json);
|
System.out.println(json);
|
||||||
System.out.println("Przed Object");
|
System.out.println(json.getClass());
|
||||||
final ObjectMapper mapper = new ObjectMapper();
|
System.out.println("Przed Object");
|
||||||
System.out.println("Przed mapą");
|
final ObjectMapper mapper = new ObjectMapper();
|
||||||
Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() {
|
System.out.println("Przed mapą");
|
||||||
});
|
Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() {
|
||||||
System.out.println(map.size());
|
});
|
||||||
System.out.println("FIELD");
|
System.out.println(map.size());
|
||||||
apiResponse.setName(map.get(NAME_FIELD));
|
System.out.println("FIELD");
|
||||||
System.out.println(map.get(NAME_FIELD));
|
apiResponse.setName(map.get(NAME_FIELD));
|
||||||
apiResponse.setSurname(map.get(SURNAME_FIELD));
|
System.out.println(map.get(NAME_FIELD));
|
||||||
System.out.println(map.get(SURNAME_FIELD));
|
apiResponse.setSurname(map.get(SURNAME_FIELD));
|
||||||
|
System.out.println(map.get(SURNAME_FIELD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException | InterruptedException | ExecutionException e) {
|
} catch (IOException | InterruptedException | ExecutionException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user