golang / protobuf

Go support for Google's protocol buffers
BSD 3-Clause "New" or "Revised" License
9.66k stars 1.58k forks source link

encoding/protojson: ignore json field #1502

Closed vahid-sohrabloo closed 1 year ago

vahid-sohrabloo commented 1 year ago

By setting the JSON name to "-" in Golang, this field will be ignored. However, by setting [json_name="-"]; it won't be ignored in encoding/protojson

puellanivis commented 1 year ago

Because this protobuf library has to keep feature parity with the other languages supported by protobuf as well, this is an issue that must be brought to the main protobuf project.

I’m going to close this as “not planned”, if/when the main project approves this feature and other languages implement it as well, then we can reopen this issue to implement.