Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i delete struct name #23

Open
mengdodo opened this issue Mar 17, 2021 · 1 comment
Open

how can i delete struct name #23

mengdodo opened this issue Mar 17, 2021 · 1 comment

Comments

@mengdodo
Copy link

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

@elliotchance
Copy link
Owner

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:"-"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants