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

mapstructuredecoder that produces structpb safe output #522

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

rinormaloku
Copy link
Contributor

Normalizes and decodes map interfaces that can have (deeply nested) numbers of type json.Number
by setting those to either to int64 or float64.

Usually, you don't need to normalize a map[string]interface{}, that you are decoding into a struct with mapstructure
Unless,, you will use it with structpb.NewValue() which doesn't handle that type and throws an invalid type error.

@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/gloo-mesh-enterprise/issues/12608

@rinormaloku rinormaloku merged commit 0a5e5aa into main Nov 7, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants