-
Notifications
You must be signed in to change notification settings - Fork 811
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
jsonPB marshaller with Enum as map value marshals enum to int #394
Comments
Interesting. Do you think golang/protobuf has the same problem, or is it gogo/protobuf specific? |
I don't know. We use gogo/protobuf and I only tested that. Will do a test with golang/protobuf |
EDIT: golang/protobuf has exactly the same issue: https://github.com/golang/protobuf/blob/master/jsonpb/jsonpb_test.go#L388-L389 protobuf/jsonpb/jsonpb_test.go Lines 385 to 387 in 58efb20
|
Thank you @timonwong |
Update: As of golang/protobuf#645, it should be fixed? |
@awalterschulze This would be really nice to have. Any ETA? I pulled gogo master in my GOPATH and ran a test and am seeing this exact issue. |
@jmarais and @donaldgraham are the new maintainers of this project. Maybe they can take a look. |
Ok thx for the quick response @awalterschulze |
Hi,
I found a inconsistency when I use the jsonpb marshaller with
EnumAsInt
not set. I have following messages defined in my proto file:The first one gets marshalled to:
the second one to:
The text was updated successfully, but these errors were encountered: