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

Using message as a value in Map seems to break deserialisation #757

Closed
Arttii opened this issue Mar 20, 2024 · 2 comments
Closed

Using message as a value in Map seems to break deserialisation #757

Arttii opened this issue Mar 20, 2024 · 2 comments

Comments

@Arttii
Copy link

Arttii commented Mar 20, 2024

Hi,

I am not sure if this is a misunderstanding on my part of some bug, but when using the following message definition:

message Stuff {
  map<string, data.structs.v1.Team> teams = 1;
  
}

nested in another message, leads to errors when decoding, I am getting the following error:

cannot decode map value for field package.structs.v1.Stuff.teams from JSON: object

The Team message itself has another map inside it, maybe that is somehow the culprit? The generation itself works fine.

Is this expected behaviour? Am I doing something wrong?

@timostamm
Copy link
Member

Hey @Arttii, we have tests for map fields with messages (see here) and are not aware of any issues with them.

Can you provide a reproducible example?

@Arttii
Copy link
Author

Arttii commented Mar 22, 2024

So this wont have a problem even if the message has another map in it right? In that case, maybe its something on my side. Thanks for the support.

@Arttii Arttii closed this as completed Mar 22, 2024
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