8000 [go] Work with pointers to primitive types by jackdoe · Pull Request #261 · Sereal/Sereal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[go] Work with pointers to primitive types #261

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jackdoe
< 8000 /path> Copy link
Contributor
@jackdoe jackdoe commented May 31, 2021

I was trying to roundtrip

type A struct {
X *int64
...
}

and it was failing with SetInt doesnt work on Ptr

this commit adds support for this kind of roundtrip, which of course
means you can serialize { int } into { *int } and then it will not be
completely compatible. (thinking about it maybe I should make it into
a flag of the decoder)

I was trying to roundtrip

type A struct {
     X *int64
     ...
}

and it was failing with SetInt doesnt work on Ptr

this commit adds support for this kind of roundtrip, which of course
means you can serialize { int } into { *int } and then it will not be
completely compatible. (thinking about it maybe I should make it into
a flag of the decoder)
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

Successfully merging this pull request may close these issues.

1 participant
0