Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

fix: Updated protobuf JSON formatting to support nested protobufs - #797

Merged
gkevinzheng merged 5 commits into
mainfrom
json-serialize-list-value
Oct 18, 2023
Merged

fix: Updated protobuf JSON formatting to support nested protobufs#797
gkevinzheng merged 5 commits into
mainfrom
json-serialize-list-value

Conversation

@gkevinzheng

Copy link
Copy Markdown
Contributor

Also added unit/system tests to test nested protobufs.

Fixes#733

@gkevinzheng
gkevinzheng requested review from a team and daniel-sancheOctober 16, 2023 21:02
@product-auto-labelproduct-auto-labelBot added the size: m Pull request size is medium. label Oct 16, 2023
@product-auto-labelproduct-auto-labelBot added the api: logging Issues related to the googleapis/python-logging API. label Oct 16, 2023
Comment threadgoogle/cloud/logging_v2/entries.py Outdated
if self.payload is not None:
try:
proto_payload = MessageToDict(self.payload)
except Exception:

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.

Can you replace this bare exception with the exception sub-class you'd expect to catch here?

@daniel-sanchedaniel-sanche 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.

Looks like there's a small lint error, but other than that LGTM!

@gkevinzhenggkevinzheng added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2023
@gkevinzheng
gkevinzheng merged commit a00c261 into mainOct 18, 2023
@gkevinzheng
gkevinzheng deleted the json-serialize-list-value branch October 18, 2023 16:02
@release-pleaserelease-pleaseBot mentioned this pull request Oct 18, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: loggingIssues related to the googleapis/python-logging API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError('Object of type ListValue is not JSON serializable')

3 participants

@gkevinzheng@daniel-sanche@yoshi-kokoro