phpserialize
phpserialize copied to clipboard
how can i delete struct name
phpserialize.Marshal(&we, &phpserialize.MarshalOptions{OnlyStdClass:false})
O:10:"wechatData":12:{s:7:"errcode";i:0;s:6:"errmsg";……}
php serialize array
a:11:{s:7:"errcode";i:0;s:6:"errmsg";……}
how can i delete struct name wechatData
Perhaps PHP did not include it because it was private? In any case you can ignore a property with tags:
type MyStruct struct {
WeChat string `php:"-"`
}