I wonder if any \n in JSON data from API should be escaped then?

On Wednesday, 2 August 2017 10:46:14 UTC-7, Danny wrote:
>
> Ok nvm - I found the bug. Turns out the php functions *str_getcsv* and 
> *fgetcsv* will process line breaks \n within a field, hence it's 
> incorrectly splitting, and its possible to have line breaks within the JSON 
> data of *AttributeValues*.
>
> On Wednesday, 2 August 2017 09:55:40 UTC-7, Danny wrote:
>>
>> FYI - using v201609 
>>
>> On Wednesday, 2 August 2017 09:53:54 UTC-7, Danny wrote:
>>>
>>> Hi
>>>
>>> I'm running the Placeholder Feed Item Report with the following fields:
>>>
>>> $report_fields = ['PlaceholderType', 'FeedId', 'FeedItemId', 
>>> 'AttributeValues', 'CustomerDescriptiveName','ExternalCustomerId', 
>>> 'StartTime', 'EndTime', 'Status'];
>>> $segment_fields = ['AdGroupId', 'AdGroupName', 'AdGroupStatus', 
>>> 'CampaignId', 'CampaignName', 'CampaignStatus'];
>>>
>>> In total, there's 15 fields being queried. Once I execute* 
>>> downloadReport()* and *saveToFile()*, I noticed that the value of 
>>> *AttributeValues* returns a JSON that for some reason the data is split 
>>> into 2 columns. I'm running into errors as my header row is 15 fields, but 
>>> the data returned is 16 fields.
>>>
>>> Is this normal and if so, how does the API determine how/when should the 
>>> *AttributeValues* JSON be split into multiple columns?
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1ced1c8a-de33-488e-acda-8a99f81c6838%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to