diff --git a/quartz/src/main/java/com/vitorpamplona/quartz/ots/http/Response.java b/quartz/src/main/java/com/vitorpamplona/quartz/ots/http/Response.java index 836b61462..adb378f38 100644 --- a/quartz/src/main/java/com/vitorpamplona/quartz/ots/http/Response.java +++ b/quartz/src/main/java/com/vitorpamplona/quartz/ots/http/Response.java @@ -1,7 +1,7 @@ package com.vitorpamplona.quartz.ots.http; -import org.json.JSONException; -import org.json.JSONObject; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.json.JsonMapper; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -69,10 +69,9 @@ public class Response { return buffer.toByteArray(); } - public JSONObject getJson() throws IOException, JSONException { + public JsonNode getJson() throws IOException { String jsonString = getString(); - JSONObject json = new JSONObject(jsonString); - - return json; + JsonMapper builder = JsonMapper.builder().build(); + return builder.readTree(jsonString); } } \ No newline at end of file