File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/main/java/com/contentstack/sdk Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,13 @@ protected synchronized void setJSON(@NotNull JSONObject jsonobject) {
83
83
} else if (itemsObj instanceof JSONObject ) {
84
84
syncItems = new ArrayList <>();
85
85
syncItems .add (sanitizeJson ((JSONObject ) itemsObj ));
86
- } else if (itemsObj instanceof ArrayList ) {
87
- ArrayList <?> itemsList = (ArrayList <?>) itemsObj ;
86
+ } else if (itemsObj instanceof List ) {
87
+ List <?> itemsList = (List <?>) itemsObj ;
88
88
syncItems = new ArrayList <>();
89
89
for (Object item : itemsList ) {
90
90
if (item instanceof JSONObject ) {
91
91
syncItems .add (sanitizeJson ((JSONObject ) item ));
92
- } else if (item instanceof LinkedHashMap ) {
93
- // Convert LinkedHashMap to JSONObject
92
+ } else if (item instanceof Map ) {
94
93
JSONObject jsonItem = new JSONObject ((Map <?, ?>) item );
95
94
syncItems .add (sanitizeJson (jsonItem ));
96
95
} else {
You can’t perform that action at this time.
0 commit comments