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

JSON serialization includes unknownFields for protobuf messages #2238

Open
johanandren opened this issue Nov 7, 2024 · 0 comments
Open

JSON serialization includes unknownFields for protobuf messages #2238

johanandren opened this issue Nov 7, 2024 · 0 comments

Comments

@johanandren
Copy link
Contributor

When using JsonSupport.encodeJson on a generated protobuf message class it includes the unknownFields field which doesn't really make sense.

If we'd add

JsonSupport.getObjectMapper().addMixIn(classOf[GeneratedMessage], classOf[IgnoreUnknownFieldsMixin])

That would sort it for the Scala Protobuf SDK, there might be something similar needed for Java as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant