-
Notifications
You must be signed in to change notification settings - Fork 211
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
Encode/decode proto's map #9
Comments
The underlying protobuf implement uses gpb, which use tuples in Erlang for maps in protobuf by default and supports maps as an option as the README shows. I'll try to figure out how to support this in grpc-elixir. Thanks! |
Thanks for the link, I may dig deeper on it later. It would be really great to have such support for maps in grpc-elixir, I could even try to work on it but first I need to study/understand the project's codebase better :-) |
Hey there! I took some free time to take a look at both projects I couldn't make it work yet but so far I've noted that:
Any thoughts on where should I go next? |
exprotobuf is replaced by protobuf now. Map has been supported. Doc is coming. |
That's really awesome to see this feature coming up. I also started to work on an implementation to support maps on I'll try testing what you've done as soon as I get some free time here. Thanks and cheers! |
Hey there, @tony612!
First, thank you again for this awesome project :-)
So, I'm trying to work with a mapped field for errors, which is properly defined in the proto file:
However it turns out that when I try to use the Elixir's map in the
errors
key:I got this error on the server:
After testing a few data structures (simple lists, keyword lists, tuples) I could only make it work with a list of tuples such as:
Is that the expected behavior? If so, is there any particular reason for choosing to encode/decode proto's maps to this kind of structure (list of tuples) rather than using the Elixir's maps?
Looking forward for your answer. Thanks!
The text was updated successfully, but these errors were encountered: