Skip to content

Commit 9a07330

Browse files
authored
Merge pull request #157 from contentstack/fix/includeContentType
fix: fixed includecontenttype issue
2 parents a617a26 + d7ab50c commit 9a07330

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)