Skip to content
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

well known not encode as expected #29

Open
elvizlai opened this issue Nov 3, 2020 · 1 comment
Open

well known not encode as expected #29

elvizlai opened this issue Nov 3, 2020 · 1 comment

Comments

@elvizlai
Copy link

elvizlai commented Nov 3, 2020

For example

given proto def

rpc Version(google.protobuf.Empty) returns(google.protobuf.Struct);

with server response impl

	resp := &structpb.Struct{
		Fields: map[string]*structpb.Value{
			"proto_version": {Kind: &structpb.Value_StringValue{
				StringValue:  "aabbcc",
			}},
		},
	}

which expect:

{"proto_version":"aabbcc"}

but got:

{"fields":{"proto_version":{"string_value":"aabbcc"}}}
@ysugimoto
Copy link
Owner

Hi @elvizlai , sorry for being late reply.

I'm guessing we may not consider google's ptype so we need more improvement for that.
we'll investigate and may support, but I really appreciate it if you could do that and give a PR.

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

No branches or pull requests

2 participants