-
Notifications
You must be signed in to change notification settings - Fork 1
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
protobuf: Issue with omitempty
in generated protobuffers
#10
Comments
Before trying a work-around, should we check how far the v2 rewrite of Protobuf has gotten? That's where we want to head going forward anyways, and with some luck this may be handled differently in v2. |
Sounds reasonable, avoid solving problems which will be solved anyway |
Do you have the link to the rewrite? |
|
The CI system has not yet been update to download the needed tools for protobuf v2 generation, these are: go get -u google.golang.org/protobuf/cmd/protoc-gen-go go get -u google.golang.org/protobuf/cmd/protoc-gen-go-grpc Note: protoc-gen-go-grpc will move to google.golang.org/grpc in the future (see golang/protobuf#903). Tentative fix of #10.
The CI system has not yet been update to download the needed tools for protobuf v2 generation, these are: go get -u google.golang.org/protobuf/cmd/protoc-gen-go go get -u google.golang.org/protobuf/cmd/protoc-gen-go-grpc Note: protoc-gen-go-grpc will move to google.golang.org/grpc in the future (see golang/protobuf#903). Tentative fix of #10.
The CI system has not yet been update to download the needed tools for protobuf v2 generation, these are: go get -u google.golang.org/protobuf/cmd/protoc-gen-go go get -u google.golang.org/protobuf/cmd/protoc-gen-go-grpc Note: protoc-gen-go-grpc will move to google.golang.org/grpc in the future (see golang/protobuf#903). Tentative fix of #10.
The CI system has not yet been update to download the needed tools for protobuf v2 generation, these are: go get -u google.golang.org/protobuf/cmd/protoc-gen-go go get -u google.golang.org/protobuf/cmd/protoc-gen-go-grpc Note: protoc-gen-go-grpc will move to google.golang.org/grpc in the future (see golang/protobuf#903). Tentative fix of #10.
A draft PR is prepared which uses v2 protobufs (see #46). However, it is not yet ready for prime time. |
omitempty
in generated protobuffersomitempty
in generated protobuffers
When strings finds a string defined at location 0, the resulting object reaching the frontend has the location field omitted since the location is
0
and thus empty. The golang code is generated with the json tag toomitempty
values which causes this bug.There are no clean solutions, but I've found these:
https://medium.com/@nevio/golang-dealing-with-protocol-buffer-omitempty-and-boolean-json-responses-ae1ba5f4e9c3
https://stackoverflow.com/questions/34716238/golang-protobuf-remove-omitempty-tag-from-generated-json-tags
The text was updated successfully, but these errors were encountered: