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
if you deserialize a serialized struct which has a *string field and for which the value is a pointer to an empty string "", the deserialized value for the *string field is nil and not a pointer to the empty string anymore.
I think this is not how it should behave, should it?
ok I see. it's very confusing to me. I understand it similar to what protobuf does then. But in a protobuf definition, you don't have pointers, so it's clear.
Here it's feels non-obvious.
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?
if you deserialize a serialized struct which has a
*string
field and for which the value is a pointer to an empty string""
, the deserialized value for the*string
field isnil
and not a pointer to the empty string anymore.I think this is not how it should behave, should it?
Gives, when run
The text was updated successfully, but these errors were encountered: