Replace jackson usages with GSON
[clamp.git] / src / main / java / org / onap / clamp / clds / client / DcaeInventoryServices.java
index 327aff1..7702307 100644 (file)
@@ -44,7 +44,7 @@ import org.onap.clamp.clds.model.DcaeEvent;
 import org.onap.clamp.clds.model.dcae.DcaeInventoryResponse;\r
 import org.onap.clamp.clds.model.properties.Global;\r
 import org.onap.clamp.clds.model.properties.ModelProperties;\r
-import org.onap.clamp.clds.util.JacksonUtils;\r
+import org.onap.clamp.clds.util.JsonUtils;\r
 import org.onap.clamp.clds.util.LoggingUtils;\r
 import org.springframework.beans.factory.annotation.Autowired;\r
 import org.springframework.stereotype.Component;\r
@@ -155,14 +155,13 @@ public class DcaeInventoryServices {
     }\r
 \r
     private DcaeInventoryResponse getItemsFromDcaeInventoryResponse(String responseStr)\r
-        throws ParseException, IOException {\r
+        throws ParseException {\r
         JSONParser parser = new JSONParser();\r
         Object obj0 = parser.parse(responseStr);\r
         JSONObject jsonObj = (JSONObject) obj0;\r
         JSONArray itemsArray = (JSONArray) jsonObj.get("items");\r
         JSONObject dcaeServiceType0 = (JSONObject) itemsArray.get(0);\r
-        return JacksonUtils.getObjectMapperInstance().readValue(dcaeServiceType0.toString(),\r
-            DcaeInventoryResponse.class);\r
+        return JsonUtils.GSON.fromJson(dcaeServiceType0.toString(), DcaeInventoryResponse.class);\r
     }\r
 \r
     /**\r