facebook / facebook-java-business-sdk

Java SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
396 stars 327 forks source link

{product_set_id}/products API response field additional_image_cdn_urls data type parsing error #337

Open inhyuck222 opened 3 years ago

inhyuck222 commented 3 years ago

Which SDK version are you using?

v10.0

What's the issue?

The type of the additional_image_cdn_urls variable of the ProductItem class is shown as List<List<Map<String, String>> in the response of api, but the ProductItem of SDK is declared as List<Map<String, String>>.

Steps/Sample code to reproduce the issue

ProductSet.APIRequestGetProducts productRequest = new ProductSet(productSetId, context).getProducts()
        .setParam("limit", limit)
        .requestAllFields();

// occur exception here
APINodeList<ProductItem> productItems = productRequest.execute();

Observed Results:

Exception Message: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 294 path $.additional_image_cdn_urls[0][0]

Expected Results:

It seems that the type of the variable declared as List<Map<String, String>> should be changed to List<List<Map<String, String>>.

https://developers.facebook.com/docs/marketing-api/reference/product-item/v10.0

image

stale[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.