square / wire

gRPC and protocol buffers for Android, Kotlin, Swift and Java.
https://square.github.io/wire/
Apache License 2.0
4.23k stars 572 forks source link

Encoding and JSON support for single unknown enum fields #2961

Closed oldergod closed 2 months ago

oldergod commented 3 months ago

When an enum has the specific proto3 generated UNRECOGNIZED constant and that the value is set to it, the message needs not to send anything on encoding + needs some magic on JSON serialization to replace it by the actual constant tag.

Look at the first commit to see the actual change without the generated code noise.

2725