Java API - null array reference: is it empty, or simply not provided?

9 views
Skip to first unread message

David Antunes

unread,
Sep 5, 2017, 6:27:35 AM9/5/17
to AdWords API Forum
Hi,

Is there any way in general terms to determine when an array on the Java API for AdWords (an array with Labels, or FinalURLs, etc) is null if that means that there are no elements or if it means that that field was not provided?

Thanks!
David

Bharani Cherukuri (AdWords API Team)

unread,
Sep 5, 2017, 2:27:04 PM9/5/17
to AdWords API Forum
Hello David,

The AdWords API doesn't return all the fields of an object by default, you need to specify the list of fields you want to retrieve when building the selector. If you have explicitly specified the corresponding field in the selector, but the value returned is null for fields of type list, then there is no value specified for the field. If you haven't specified the field in the selector, then the corresponding object is not populated in the response. 

Regards,
Bharani, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages