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
I expect the json.Unmarshal function to succeed and that unmarshalVal would be filled with a value
What did you see instead?
json.Unmarshal returns an error, but it should have worked because TestType.Prop does implement the encoding.TextUnmarshaller interface
The text was updated successfully, but these errors were encountered:
JakubC-projects
changed the title
affected/package:
package: encoding/json does not unmarshal my struct properly
Sep 22, 2023
JakubC-projects
changed the title
package: encoding/json does not unmarshal my struct properly
encoding/json does not unmarshal my struct properly
Sep 22, 2023
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://go.dev/play/p/WpDjZxkzO25
What did you expect to see?
I expect the
json.Unmarshal
function to succeed and that unmarshalVal would be filled with a valueWhat did you see instead?
json.Unmarshal
returns an error, but it should have worked becauseTestType.Prop
does implement theencoding.TextUnmarshaller
interfaceThe text was updated successfully, but these errors were encountered: