You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Json fields with hypen (-) are not decoded properly #83
Have you tried mapstructure:"bar-baz" instead of json? I assumed the json tags would also work, but there is an example in the documentation that uses mapstructure.
Activity
[-]Json fields with hypen (-) are not encoded properly[/-][+]Json fields with hypen (-) are not decoded properly[/+]fedulovivan commentedon Mar 27, 2025
BTW, if I replace mapstructure.Decode with following workaround
everything works as intended
ddelpero commentedon Mar 31, 2025
Have you tried mapstructure:"bar-baz" instead of json? I assumed the json tags would also work, but there is an example in the documentation that uses mapstructure.
fedulovivan commentedon Apr 1, 2025
@ddelpero Thank you, yep I can confirm replacing "json" with "mapstructure" fixes the issue. Anyway this looks like a bug.
ddelpero commentedon Apr 3, 2025
You can use a custom decoder config: