encoding/json: UnmarshalTypeError Offset is broken if a nested struct implements UnmarshalJSON #43686
Labels
FrozenDueToAge
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
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/dJYX2lDwSKb
What did you expect to see?
json.UnmarshalTypeError.Offset to be the same for nested structs.
What did you see instead?
json.UnmarshalTypeError.Offset
is only in the scope of nested struct if the struct implements a UnmarshalJSON method. TheOffset
should start from the beginning of the structThe text was updated successfully, but these errors were encountered: