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
type api struct { Serial string `json:ser,string` }
What did you expect to see?
No error
What did you see instead?
invalid use of ,string struct tag, trying to unmarshal "ser" into api.Serial"
While the error can easily be worked around by omitting the string tag, it shouldn't error as the types are compatible. That is- unless this error message is intended to ensure that the json user is 100% aware of the json schema he consumes.
The text was updated successfully, but these errors were encountered:
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?
Unmarshal
into
What did you expect to see?
No error
What did you see instead?
While the error can easily be worked around by omitting the string tag, it shouldn't error as the types are compatible. That is- unless this error message is intended to ensure that the json user is 100% aware of the json schema he consumes.
The text was updated successfully, but these errors were encountered: