Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Fix wrapper extension JSON serialization #821

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

timostamm
Copy link
Member

A singular message field using one of the wrapper messages from google/protobuf/wrappers.proto uses the "unwrapped" value as the property type. For example, google.protobuf.BoolValue field = 1 is generated as field?: boolean.

The same principle applies to extension fields, but serialization to JSON and parsing from JSON for such an extension field is broken. This fixes the issue, and adds test coverage.

@timostamm timostamm merged commit 896338d into v2 Apr 30, 2024
7 checks passed
@timostamm timostamm deleted the tstamm/fix-v2-wrapper-extension-json branch April 30, 2024 12:35
@timostamm timostamm changed the title Fix wrapper extension JSON serialization V2: Fix wrapper extension JSON serialization Apr 30, 2024
@timostamm timostamm mentioned this pull request May 13, 2024
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