Skip to content

JSON serialization includes unknownFields for protobuf messages #2238

@johanandren

Description

@johanandren

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions