Skip to content

Commit

Permalink
fix: fixed includecontenttype issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikram Kalta authored and Vikram Kalta committed Dec 9, 2024
1 parent a617a26 commit 5346eba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.contentstack.sdk</groupId>
<artifactId>java</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
<packaging>jar</packaging>
<name>contentstack-java</name>
<description>Java SDK for Contentstack Content Delivery API</description>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/contentstack/sdk/QueryResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.json.JSONObject;

import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down Expand Up @@ -105,7 +106,8 @@ private void extractSchemaArray() {
private void extractContentObject() {
try {
if (receiveJson != null && receiveJson.has("content_type")) {
JSONObject jsonObject = receiveJson.getJSONObject("content_type");
Object contentTypeObject = receiveJson.get("content_type");
JSONObject jsonObject = new JSONObject((Map<?, ?>) contentTypeObject);
if (jsonObject != null) {
contentObject = jsonObject;
}
Expand Down

0 comments on commit 5346eba

Please sign in to comment.