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

Fix pointer marshal #56

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Fix pointer marshal #56

merged 2 commits into from
Oct 3, 2024

Conversation

alecsammon
Copy link
Contributor

There is current support for structs that have a json marshaller in the form or

func (c Custom) MarshalJSON() ([]byte, error) {

However this does not work with the following case where MarshalJSON has a pointer reciever.

func (c *Custom) MarshalJSON() ([]byte, error) {

This PR fixes this case, and adds test for both the existing functionality and the new form.

@alecsammon alecsammon marked this pull request as ready for review July 3, 2024 14:42
@coveralls
Copy link

Coverage Status

coverage: 89.431% (+0.3%) from 89.167%
when pulling ee8f159 on alecsammon:fix_pointer_marshal
into e127e90 on liip:master.

@mweibel mweibel enabled auto-merge (rebase) October 3, 2024 06:37
@coveralls
Copy link

Coverage Status

coverage: 89.431% (+0.3%) from 89.167%
when pulling 638bacd on alecsammon:fix_pointer_marshal
into dc3eac4 on liip:master.

3 similar comments
@coveralls
Copy link

Coverage Status

coverage: 89.431% (+0.3%) from 89.167%
when pulling 638bacd on alecsammon:fix_pointer_marshal
into dc3eac4 on liip:master.

@coveralls
Copy link

Coverage Status

coverage: 89.431% (+0.3%) from 89.167%
when pulling 638bacd on alecsammon:fix_pointer_marshal
into dc3eac4 on liip:master.

@coveralls
Copy link

Coverage Status

coverage: 89.431% (+0.3%) from 89.167%
when pulling 638bacd on alecsammon:fix_pointer_marshal
into dc3eac4 on liip:master.

@mweibel mweibel merged commit 3faa0cd into liip:master Oct 3, 2024
5 checks passed
@alecsammon
Copy link
Contributor Author

❤️ - thank you

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.

3 participants