sheriff icon indicating copy to clipboard operation
sheriff copied to clipboard

Fix pointer marshal

Open alecsammon opened this issue 7 months ago • 1 comments

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 avatar Jul 03 '24 14:07 alecsammon