encoding/xml: fail to roundtrip with interface inside #46432
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes... as playground says "The current version is go1.16.4."
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I use interface to build structure of xml in runtime. I dump to xml successfully, but fail to load data back.
What did you expect to see?
I expect to do roundtrip encoding-decoding with the same structure of type-value combination in golang.
What did you see instead?
The current implementation use name of interface field in parsing instead of XMLName inside referenced structure.
Testcase
Source of https://play.golang.org/p/bAMPYS-rjSe :
The text was updated successfully, but these errors were encountered: