Skip to content

Commit 5346eba

Browse files
Vikram KaltaVikram Kalta
authored andcommitted
fix: fixed includecontenttype issue
1 parent a617a26 commit 5346eba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.contentstack.sdk</groupId>
77
<artifactId>java</artifactId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
<packaging>jar</packaging>
1010
<name>contentstack-java</name>
1111
<description>Java SDK for Contentstack Content Delivery API</description>

src/main/java/com/contentstack/sdk/QueryResult.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.json.JSONObject;
55

66
import java.util.List;
7+
import java.util.Map;
78
import java.util.logging.Level;
89
import java.util.logging.Logger;
910

@@ -105,7 +106,8 @@ private void extractSchemaArray() {
105106
private void extractContentObject() {
106107
try {
107108
if (receiveJson != null && receiveJson.has("content_type")) {
108-
JSONObject jsonObject = receiveJson.getJSONObject("content_type");
109+
Object contentTypeObject = receiveJson.get("content_type");
110+
JSONObject jsonObject = new JSONObject((Map<?, ?>) contentTypeObject);
109111
if (jsonObject != null) {
110112
contentObject = jsonObject;
111113
}

0 commit comments

Comments
 (0)