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) {
8383 } else if (itemsObj instanceof JSONObject ) {
8484 syncItems = new ArrayList <>();
8585 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 ;
8888 syncItems = new ArrayList <>();
8989 for (Object item : itemsList ) {
9090 if (item instanceof JSONObject ) {
9191 syncItems .add (sanitizeJson ((JSONObject ) item ));
92- } else if (item instanceof LinkedHashMap ) {
93- // Convert LinkedHashMap to JSONObject
92+ } else if (item instanceof Map ) {
9493 JSONObject jsonItem = new JSONObject ((Map <?, ?>) item );
9594 syncItems .add (sanitizeJson (jsonItem ));
9695 } else {
You can’t perform that action at this time.
0 commit comments