Open damonandall opened 2 years ago
com.facebook.business.sdk:facebook-java-business-sdk:13.0.0
Caused by: java.lang.IllegalStateException: Not a JSON Object
ProductItem
obj = obj.get("images").getAsJsonObject(); Iterator var10 = obj.entrySet().iterator(); while(var10.hasNext()) { Entry<String, JsonElement> entry = (Entry)var10.next(); productItems.add(loadJSON(((JsonElement)entry.getValue()).toString(), context, header)); } return productItems;
images is the list of string
should instanceof JsonObject or JsonArray
if (obj instanceof JsonObject) { JsonObject jobject = obj.getAsJsonObject(); } else if (obj instanceof JsonArray) { JsonArray jarray = obj.getAsJsonArray(); }
Which SDK version are you using?
com.facebook.business.sdk:facebook-java-business-sdk:13.0.0
What's the issue?
Caused by: java.lang.IllegalStateException: Not a JSON Object
class
ProductItem
error code
images is the list of string
should instanceof JsonObject or JsonArray
if (obj instanceof JsonObject) { JsonObject jobject = obj.getAsJsonObject(); } else if (obj instanceof JsonArray) { JsonArray jarray = obj.getAsJsonArray(); }