Skip to content

fix: handle bytes in map and repeated fields in toProto3JSON#8351

Open
mjameswh wants to merge 1 commit into
googleapis:mainfrom
mjameswh:fix-bytes-map-repeated
Open

fix: handle bytes in map and repeated fields in toProto3JSON#8351
mjameswh wants to merge 1 commit into
googleapis:mainfrom
mjameswh:fix-bytes-map-repeated

Conversation

@mjameswh
Copy link
Copy Markdown

Summary

  • toProto3JSON failed to base64-encode bytes values inside map and repeated fields
  • Moved Buffer/Uint8Array handling into convertSingleValue so it applies everywhere, not just top-level fields

Fixes #7704

@mjameswh mjameswh requested a review from a team as a code owner May 22, 2026 21:42
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 22, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for bytes fields within maps and repeated fields in the proto3-json-serializer-nodejs package. It updates the proto definitions, test fixtures, and the serialization logic in toproto3json.ts by moving the byte conversion logic into convertSingleValue. New unit tests for map and repeated byte fields are also included. I have no feedback to provide.

@mjameswh
Copy link
Copy Markdown
Author

For info, I believe our company has already signed the CLA; I'm working internally on getting added to the authorized list of emails.

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.

toProto3JSON doesn't correctly handle map of bytes

1 participant