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

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

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.

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.

2 participants