adoroszlai commented on code in PR #6400:
URL: https://github.com/apache/ozone/pull/6400#discussion_r1534164729


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/server/JsonUtils.java:
##########
@@ -81,6 +83,22 @@ public static JsonNode readTree(String content) throws 
IOException {
     return MAPPER.readTree(content);
   }
 
+  public static HashMap<String, Object> getResponseMap(String response)
+      throws IOException {
+    return MAPPER.readValue(response,
+        new TypeReference<HashMap<String, Object>>() {
+        });
+  }
+
+  public static List<HashMap<String, Object>> readTreeAsListOfMaps(String json)
+      throws IOException {
+    ObjectMapper objectMapper = new ObjectMapper();
+    return objectMapper.readValue(json,
+        new TypeReference<List<HashMap<String, Object>>>() {
+        });
+  }

Review Comment:
   Ah, ok, I see that one has an additional level of `List`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to