encoding/json: possible bug when unmarshaling maps with a custom struct as their key #38771
Labels
Milestone
Comments
When I ran the code provided in playground link locally unmarshaling works as expected and key values printed by program are perfect Go version which I am using for reference |
cc @mvdan |
Duplicate of #38105, where the fix is already in master and it's being backported for 1.14.3. |
jspdown
added a commit
to jspdown/maesh
that referenced
this issue
May 15, 2020
This commit also provides a workaround for golang/go#38771 on ServiceTrafficTargetKey. A test has been added to cover the changes made on the TopologyBuilder.
jspdown
added a commit
to jspdown/maesh
that referenced
this issue
May 18, 2020
This commit also provides a workaround for golang/go#38771 on ServiceTrafficTargetKey. A test has been added to cover the changes made on the TopologyBuilder.
jspdown
added a commit
to jspdown/maesh
that referenced
this issue
May 19, 2020
This commit also provides a workaround for golang/go#38771 on ServiceTrafficTargetKey. A test has been added to cover the changes made on the TopologyBuilder.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Here's a playground link describing the issue.
This issue seems to only occur when
other.Name
contains a special character ("
or\
for example) after the size of the key.What did you expect to see?
When unmarshaled, the keys are correct.
What did you see instead?
The keys are incorrect under certain circumstances.
The text was updated successfully, but these errors were encountered: