Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

gogoproto protobuf jsonification #50

Open
andres-erbsen opened this issue Feb 24, 2016 · 1 comment
Open

gogoproto protobuf jsonification #50

andres-erbsen opened this issue Feb 24, 2016 · 1 comment

Comments

@andres-erbsen
Copy link
Contributor

The JSON marshalers and unmarshalers our generate script produces using the latest gogoproto do not pass the autogenerated tests (they fail by trying to unmarshal an enum as if it had been encoded as an int, but it is actually encoded as a string). I don't know what causes this.

OTOH, the only part where andres-erbsen/protobuf differs from gogo/protobuf is the jsonpb package. In particular, I believe this means that we do not need to use my fork for code generation, only for json marshaling (by sed-patching the jsonpb in the generated files). This will hopefully let us catch the next issue of this kind right when gogoproto introduces it. Even better, if we play it well, then we might be able to upstream the jsonification patch ("prefer specialized Marshal/Unmarshal implementations to the generic" can sound pretty well, even though we use this in a hacky way in our project).

How urgent is updating gogoproto compared to working on cluster membership changes?

@maditya
Copy link
Contributor

maditya commented Feb 26, 2016

This can very well happen after the cluster membership changes.

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

No branches or pull requests

2 participants