-
Notifications
You must be signed in to change notification settings - Fork 13
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
Error when marshalling a structure with a field being an interface #13
Comments
@ziemekobel-ef Can reproduce, but after a bit of digging, I'm still not sure how to fix this, so this might or might not be fixed in the future. With the advent of |
Yeah, I can totally understand it. TBH I would use |
@wI2L Hey I was looking at this library for its ability to customize the encoding of time.Time without needing to define a custom time.Time wrapper. You mentioned above that Can you clarify whether goccy/go-json actually can do the custom time encoding functionality that this package can do? (Right now, that doesn't look to be the case) |
@takanuva15 Not to my knowledge, but that's because goccy/go-json implement exactly the API the same way as the official encoding/json package, whereas this package adds some custom features, |
When trying to marshal a structure that has a field declared as an interface, an error gets returned.
Tested using Go 1.21, MacOS 14.0, M1 Pro.
The following test demonstrates it:
returns:
The text was updated successfully, but these errors were encountered: