Skip to content

Remove JSON serialization of Proto messages#95

Merged
BenRKarl merged 18 commits into
masterfrom
remove-json
May 10, 2019
Merged

Remove JSON serialization of Proto messages#95
BenRKarl merged 18 commits into
masterfrom
remove-json

Conversation

@BenRKarl

@BenRKarl BenRKarl commented May 2, 2019

Copy link
Copy Markdown
Contributor

JSON Serialization of fields such as video_quartile_25_rate that contain a digit following an underscore will raise errors in Python.

This is expected behavior because it's not possible to serialize from snake_case to camelCase and back when a digit follows an underscore.

The fields in the API that contain this pattern are technically breaking this convention, but until a broader resolution is arrived at it's easier for now to simply not serialize messages to JSON for the purposes of logging because proto objects serialize to string very well on their own already.

This PR also introduces some general refactoring and cleanup.

@BenRKarl BenRKarl self-assigned this May 2, 2019

@wihl wihl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mainly a syntactic and formatting review. I haven't yet tested the functionality. I'll be able to give a more thorough check in a couple of days and will file an issue if I find anything.

Comment thread google/ads/google_ads/client.py
Comment thread google/ads/google_ads/client.py Outdated
Comment thread google/ads/google_ads/client.py Outdated
Comment thread google/ads/google_ads/client.py
Comment thread google/ads/google_ads/client.py
Comment thread tests/client_test.py

@wihl wihl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenRKarl BenRKarl requested review from AnashOommen and removed request for msaniscalchi May 10, 2019 17:38
@BenRKarl BenRKarl merged commit 45a8d46 into master May 10, 2019
@BenRKarl BenRKarl deleted the remove-json branch May 10, 2019 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants