Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed includecontenttype issue #157

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading