Skip to content

Improve protojson marshal options - #127

Merged
koodeex merged 1 commit into
masterfrom
emit-defaults-protojson
Sep 8, 2025
Merged

Improve protojson marshal options#127
koodeex merged 1 commit into
masterfrom
emit-defaults-protojson

Conversation

@metafates

Copy link
Copy Markdown
Member

This MR improves marshal options protojson uses when marshalling parameter values which implement proto.Message

It uses the following options:

  • AllowPartial: true - allows messages that have missing required fields to marshal without returning an error.
  • EmitDefaultValues: true - specifies whether to emit default-valued primitive fields, empty lists, and empty maps.
  • EmitUnpopulated: true - specifies whether to emit unpopulated fields.

@metafates metafates self-assigned this Sep 8, 2025
@metafates
metafates requested a review from koodeex September 8, 2025 12:24
@koodeex
koodeex merged commit a08478b into master Sep 8, 2025
5 of 6 checks passed
@metafates
metafates deleted the emit-defaults-protojson branch December 3, 2025 07:03
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.

2 participants